diff options
author | Kim Alvefur <zash@zash.se> | 2020-03-22 21:05:59 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-03-22 21:05:59 +0100 |
commit | a94da35eb0898be2ada5befc0c5a2b8923741660 (patch) | |
tree | 8d37391fd82ba47464849f1e65a64c9f9ffc2a98 /plugins/mod_storage_sql.lua | |
parent | 4a257f3ce6b82d9451babc8cf92b5dc1b669a059 (diff) | |
download | prosody-a94da35eb0898be2ada5befc0c5a2b8923741660.tar.gz prosody-a94da35eb0898be2ada5befc0c5a2b8923741660.zip |
mod_storage_sql: Add index covering sort_id to improve performance (fixes #1505)
Diffstat (limited to 'plugins/mod_storage_sql.lua')
-rw-r--r-- | plugins/mod_storage_sql.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua index 73207073..5b1c3603 100644 --- a/plugins/mod_storage_sql.lua +++ b/plugins/mod_storage_sql.lua @@ -500,6 +500,7 @@ local function create_table(engine) -- luacheck: ignore 431/engine Index { name="prosodyarchive_index", unique = engine.params.driver ~= "MySQL", "host", "user", "store", "key" }; Index { name="prosodyarchive_with_when", "host", "user", "store", "with", "when" }; Index { name="prosodyarchive_when", "host", "user", "store", "when" }; + Index { name="prosodyarchive_sort", "host", "user", "store", "sort_id" }; }; engine:transaction(function() ProsodyArchiveTable:create(engine); |