Skip to content
Snippets Groups Projects
Unverified Commit af7e129b authored by Ezekiel Lee's avatar Ezekiel Lee Committed by GitHub
Browse files

fix(backend): timeout when querying mentions (#11799)

parent 90b058e2
No related branches found
No related tags found
No related merge requests found
......@@ -63,6 +63,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
.where(`'{"${me.id}"}' <@ note.mentions`)
.orWhere(`'{"${me.id}"}' <@ note.visibleUserIds`);
}))
// Avoid scanning primary key index
.orderBy('CONCAT(note.id)', 'DESC')
.innerJoinAndSelect('note.user', 'user')
.leftJoinAndSelect('note.reply', 'reply')
.leftJoinAndSelect('note.renote', 'renote')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment