summary refs log tree commit diff
path: root/synapse/storage/databases/main/schema
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-11-02 13:55:56 +0000
committerGitHub <noreply@github.com>2020-11-02 13:55:56 +0000
commit1eb9de90c0dbb99a28304a295a0f6ebb0b8d1c6c (patch)
tree6c0dbde912ffa5227dde5ad5361953a574295783 /synapse/storage/databases/main/schema
parenttypo (diff)
downloadsynapse-1eb9de90c0dbb99a28304a295a0f6ebb0b8d1c6c.tar.xz
Improve start time by adding index to e2e_cross_signing_keys (#8694)
We do a `SELECT MAX(stream_id) FROM e2e_cross_signing_keys` on startup.
Diffstat (limited to 'synapse/storage/databases/main/schema')
-rw-r--r--synapse/storage/databases/main/schema/delta/58/23e2e_cross_signing_keys_idx.sql17
1 files changed, 17 insertions, 0 deletions
diff --git a/synapse/storage/databases/main/schema/delta/58/23e2e_cross_signing_keys_idx.sql b/synapse/storage/databases/main/schema/delta/58/23e2e_cross_signing_keys_idx.sql
new file mode 100644
index 0000000000..61c558db77
--- /dev/null
+++ b/synapse/storage/databases/main/schema/delta/58/23e2e_cross_signing_keys_idx.sql
@@ -0,0 +1,17 @@
+/* Copyright 2020 The Matrix.org Foundation C.I.C
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+INSERT INTO background_updates (update_name, progress_json) VALUES
+  ('e2e_cross_signing_keys_idx', '{}');