mirror of
https://github.com/element-hq/synapse
synced 2024-09-04 13:40:07 +00:00
add inidexes based on usage
This commit is contained in:
parent
5917562b60
commit
d0857702e8
1 changed files with 2 additions and 6 deletions
|
@ -16,10 +16,6 @@
|
|||
|
||||
CREATE TABLE user_daily_visits ( user_id TEXT NOT NULL,
|
||||
device_id TEXT,
|
||||
user_agent TEXT NOT NULL,
|
||||
timestamp BIGINT NOT NULL );
|
||||
|
||||
/* What indexes should I include?
|
||||
* Reads are offline so should optimise for writes
|
||||
* Need to check if already an entry so user,day
|
||||
*/
|
||||
CREATE INDEX user_daily_visits_uts_idx ON user_daily_visits(user_id, timestamp);
|
||||
CREATE INDEX user_daily_visits_ts_idx ON user_daily_visits(timestamp);
|
||||
|
|
Loading…
Reference in a new issue