mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-26 05:15:19 +00:00
fix(backend): timeout when querying mentions (#11799)
This commit is contained in:
parent
90b058e226
commit
af7e129b1e
1 changed files with 2 additions and 0 deletions
|
@ -63,6 +63,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
.where(`'{"${me.id}"}' <@ note.mentions`)
|
.where(`'{"${me.id}"}' <@ note.mentions`)
|
||||||
.orWhere(`'{"${me.id}"}' <@ note.visibleUserIds`);
|
.orWhere(`'{"${me.id}"}' <@ note.visibleUserIds`);
|
||||||
}))
|
}))
|
||||||
|
// Avoid scanning primary key index
|
||||||
|
.orderBy('CONCAT(note.id)', 'DESC')
|
||||||
.innerJoinAndSelect('note.user', 'user')
|
.innerJoinAndSelect('note.user', 'user')
|
||||||
.leftJoinAndSelect('note.reply', 'reply')
|
.leftJoinAndSelect('note.reply', 'reply')
|
||||||
.leftJoinAndSelect('note.renote', 'renote')
|
.leftJoinAndSelect('note.renote', 'renote')
|
||||||
|
|
Loading…
Reference in a new issue