mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-07-15 07:43:44 -05:00
Seasons page small index optimization
This commit is contained in:
parent
bd3559740a
commit
2f75446fe6
|
|
@ -174,7 +174,6 @@ const pagesStm = sql.prepare(/* sql */ `
|
|||
"GroupMatch"."alphaGroupId" = "Group"."id" or
|
||||
"GroupMatch"."bravoGroupId" = "Group"."id"
|
||||
left join "GroupMember" on "Group"."id" = "GroupMember"."groupId"
|
||||
left join "GroupMatchMap" on "GroupMatch"."id" = "GroupMatchMap"."matchId"
|
||||
where "GroupMember"."userId" = @userId
|
||||
and "GroupMatch"."createdAt" between @starts and @ends
|
||||
group by "GroupMatch"."id"
|
||||
|
|
|
|||
8
migrations/052-indexes.js
Normal file
8
migrations/052-indexes.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
export function up(db) {
|
||||
db.transaction(() => {
|
||||
db.prepare(
|
||||
/*sql */ `create index group_match_created_at on "GroupMatch"("createdAt")`,
|
||||
).run();
|
||||
db.prepare(/*sql */ `create index skill_season on "Skill"("season")`).run();
|
||||
})();
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user