Seasons page small index optimization

This commit is contained in:
Kalle 2024-04-05 18:18:45 +03:00
parent bd3559740a
commit 2f75446fe6
2 changed files with 8 additions and 1 deletions

View File

@ -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"

View 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();
})();
}