mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-12 06:14:19 -05:00
add inidexes based on usage
This commit is contained in:
parent
5917562b60
commit
d0857702e8
@ -16,10 +16,6 @@
|
|||||||
|
|
||||||
CREATE TABLE user_daily_visits ( user_id TEXT NOT NULL,
|
CREATE TABLE user_daily_visits ( user_id TEXT NOT NULL,
|
||||||
device_id TEXT,
|
device_id TEXT,
|
||||||
user_agent TEXT NOT NULL,
|
|
||||||
timestamp BIGINT NOT NULL );
|
timestamp BIGINT NOT NULL );
|
||||||
|
CREATE INDEX user_daily_visits_uts_idx ON user_daily_visits(user_id, timestamp);
|
||||||
/* What indexes should I include?
|
CREATE INDEX user_daily_visits_ts_idx ON user_daily_visits(timestamp);
|
||||||
* Reads are offline so should optimise for writes
|
|
||||||
* Need to check if already an entry so user,day
|
|
||||||
*/
|
|
||||||
|
Loading…
Reference in New Issue
Block a user