Timothy Messier
c9578b441a
perf(db): Add indexes on foreign key to improve delete performance
...
This adds indexes for a few categories:
1. Foreign keys on the session table. These are set to `null` when the
referenced row is deleted. These indexes will help to more
efficiently set these `null` values in the case where a target is
deleted, or and auth token is deleted.
2. Foreign keys from other tables to the session table. These are either
set to `null` or cascade deleted when a session is deleted. These
indexes help with these update/deletes when a session is deleted.
3. A multi-column index on session_state. This helps with the query that
is used to delete all terminated sessions that have been terminated
for over an hour.
(cherry picked from commit 263a96e9ddd197cb36f2c4c74e91ac034112321e)
2024-09-24 14:18:54 +00:00
..
2024-07-23 14:19:21 -04:00
2023-08-11 10:31:53 -07:00
2024-01-05 07:43:22 -08:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2024-01-22 14:03:40 -05:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2024-07-23 14:19:21 -04:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2024-07-23 14:19:21 -04:00
2024-01-11 09:44:44 -08:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2024-01-05 07:43:22 -08:00
2023-08-11 10:31:53 -07:00
2024-01-05 07:43:22 -08:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2024-01-11 09:44:44 -08:00
2023-08-11 10:31:53 -07:00
2024-04-05 16:44:54 -04:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2024-04-11 09:08:45 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2024-04-11 09:08:45 -07:00
2024-02-23 15:44:08 +00:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2024-02-23 15:44:08 +00:00
2023-08-11 10:31:53 -07:00
2023-09-06 15:07:45 -04:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2024-01-16 15:47:12 -08:00
2024-02-23 15:44:09 +00:00
2023-08-11 10:31:53 -07:00
2023-08-11 10:31:53 -07:00
2024-07-17 14:23:11 -04:00
2023-09-06 15:07:45 -04:00
2023-10-23 18:42:23 -04:00
2024-01-05 07:43:20 -08:00
2024-01-05 07:43:20 -08:00
2024-01-05 07:43:22 -08:00
2024-01-19 10:59:18 -08:00
2024-08-14 09:03:17 -07:00
2024-01-30 11:04:05 -05:00
2024-02-29 15:51:24 -08:00
2024-02-29 15:52:27 -08:00
2024-04-05 16:44:54 -04:00
2024-04-11 09:08:49 -07:00
2024-07-22 12:06:35 -04:00
2024-07-23 14:19:21 -04:00
2024-08-02 09:08:16 -07:00
2024-09-24 14:18:54 +00:00