diff options
author | Richard van der Hoff <richard@matrix.org> | 2016-07-22 13:14:03 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2016-07-22 13:16:39 +0100 |
commit | ec5717caf59eb72caf6f82f1643f492f328a4be5 (patch) | |
tree | 57cd7e8a58bcd51902d854e1da69f2458ae1a3bb /synapse/storage/schema/delta | |
parent | Merge pull request #944 from matrix-org/rav/devices_returns_list (diff) | |
download | synapse-ec5717caf59eb72caf6f82f1643f492f328a4be5.tar.xz |
Create index on user_ips in the background
user_ips is kinda big, so really we want to add the index in the background once we're running. Replace the schema delta with one which will do that. I've done this in a way that's reasonably easy to reuse as there a few other indexes I need, and I don't suppose they will be the last.
Diffstat (limited to 'synapse/storage/schema/delta')
-rw-r--r-- | synapse/storage/schema/delta/33/user_ips_index.sql | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/schema/delta/33/user_ips_index.sql b/synapse/storage/schema/delta/33/user_ips_index.sql index 8a05677d42..473f75a78e 100644 --- a/synapse/storage/schema/delta/33/user_ips_index.sql +++ b/synapse/storage/schema/delta/33/user_ips_index.sql @@ -13,4 +13,5 @@ * limitations under the License. */ -CREATE INDEX user_ips_device_id ON user_ips(user_id, device_id, last_seen); +INSERT INTO background_updates (update_name, progress_json) VALUES + ('user_ips_device_index', '{}'); |