refactor: noteテーブルのインデックス整理と配列カラムへのクエリでインデックスを使うように (#12993)
* Optimize note model index * enhance(backend): ANY()をやめる (MisskeyIO#239) * add small e2e test drive endpoint --------- Co-authored-by: まっちゃとーにゅ <17376330+u1-liquid@users.noreply.github.com>
This commit is contained in:
parent
0ea8e0c25c
commit
d92aaf81c4
9 changed files with 188 additions and 27 deletions
|
@ -212,8 +212,8 @@ export class QueryService {
|
|||
// または 自分自身
|
||||
.orWhere('note.userId = :meId')
|
||||
// または 自分宛て
|
||||
.orWhere(':meId = ANY(note.visibleUserIds)')
|
||||
.orWhere(':meId = ANY(note.mentions)')
|
||||
.orWhere(':meIdAsList <@ note.visibleUserIds')
|
||||
.orWhere(':meIdAsList <@ note.mentions')
|
||||
.orWhere(new Brackets(qb => {
|
||||
qb
|
||||
// または フォロワー宛ての投稿であり、
|
||||
|
@ -228,7 +228,7 @@ export class QueryService {
|
|||
}));
|
||||
}));
|
||||
|
||||
q.setParameters({ meId: me.id });
|
||||
q.setParameters({ meId: me.id, meIdAsList: [me.id] });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue