mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 09:49:18 +02:00
sql/*: Add username to peer indexes
The username is available for all MAM queries in question, and adding it to the indexes can improve the lookup performance significantly.
This commit is contained in:
parent
5bf753fd2d
commit
f7566bd00e
7 changed files with 24 additions and 25 deletions
|
@ -98,9 +98,9 @@ CREATE TABLE archive (
|
|||
);
|
||||
|
||||
CREATE INDEX i_username_timestamp ON archive(username, timestamp);
|
||||
CREATE INDEX i_archive_username_peer ON archive (username, peer);
|
||||
CREATE INDEX i_archive_username_bare_peer ON archive (username, bare_peer);
|
||||
CREATE INDEX i_timestamp ON archive(timestamp);
|
||||
CREATE INDEX i_peer ON archive(peer);
|
||||
CREATE INDEX i_bare_peer ON archive(bare_peer);
|
||||
|
||||
CREATE TABLE archive_prefs (
|
||||
username text NOT NULL PRIMARY KEY,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue