Merge pull request 'PEP-219: индекс events(session_id, type) — доска грузится 6 с' (#201) from task/pep-219 into main
This commit is contained in:
commit
b170560cba
1
packages/db/migrations/0024_events_session_type.sql
Normal file
1
packages/db/migrations/0024_events_session_type.sql
Normal file
@ -0,0 +1 @@
|
|||||||
|
CREATE INDEX `events_session_type` ON `events` (`session_id`,`type`);
|
||||||
4613
packages/db/migrations/meta/0024_snapshot.json
Normal file
4613
packages/db/migrations/meta/0024_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -169,6 +169,13 @@
|
|||||||
"when": 1794919319811,
|
"when": 1794919319811,
|
||||||
"tag": "0023_curious_steel_serpent",
|
"tag": "0023_curious_steel_serpent",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idx": 24,
|
||||||
|
"version": "6",
|
||||||
|
"when": 1795017454043,
|
||||||
|
"tag": "0024_events_session_type",
|
||||||
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -492,7 +492,7 @@ export const events = sqliteTable(
|
|||||||
actorClientId: text("actor_client_id"),
|
actorClientId: text("actor_client_id"),
|
||||||
createdAt: createdAt(),
|
createdAt: createdAt(),
|
||||||
},
|
},
|
||||||
(t) => [index("events_created_at").on(t.createdAt)],
|
(t) => [index("events_created_at").on(t.createdAt), index("events_session_type").on(t.sessionId, t.type)],
|
||||||
);
|
);
|
||||||
|
|
||||||
/** Small key/value store for service state (Telegram offset, pairing, binding). */
|
/** Small key/value store for service state (Telegram offset, pairing, binding). */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user