Commit 39fa1cd0 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

[JM-1236] Added index on jiveRoster.jid. (except for Sybase, which can't have...

[JM-1236] Added index on jiveRoster.jid.  (except for Sybase, which can't have an index on a TEXT field)

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9822 b35dd754-fafc-0310-a699-88a17e54d16e
parent 6d13c908
...@@ -58,6 +58,7 @@ CREATE TABLE jiveRoster ( ...@@ -58,6 +58,7 @@ CREATE TABLE jiveRoster (
CONSTRAINT jiveRoster_pk PRIMARY KEY (rosterID) CONSTRAINT jiveRoster_pk PRIMARY KEY (rosterID)
); );
CREATE INDEX jiveR_userid_idx ON jiveRoster (username ASC); CREATE INDEX jiveR_userid_idx ON jiveRoster (username ASC);
CREATE INDEX jiveR_jid_idx ON jiveRoster (jid ASC);
CREATE TABLE jiveRosterGroups ( CREATE TABLE jiveRosterGroups (
...@@ -342,7 +343,7 @@ INSERT INTO jiveID (idType, id) VALUES (18, 1); ...@@ -342,7 +343,7 @@ INSERT INTO jiveID (idType, id) VALUES (18, 1);
INSERT INTO jiveID (idType, id) VALUES (19, 1); INSERT INTO jiveID (idType, id) VALUES (19, 1);
INSERT INTO jiveID (idType, id) VALUES (23, 1); INSERT INTO jiveID (idType, id) VALUES (23, 1);
INSERT INTO jiveVersion (name, version) VALUES ('openfire', 13); INSERT INTO jiveVersion (name, version) VALUES ('openfire', 14);
-- Entry for admin user -- Entry for admin user
INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate) INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate)
......
...@@ -58,6 +58,7 @@ CREATE TABLE jiveRoster ( ...@@ -58,6 +58,7 @@ CREATE TABLE jiveRoster (
CONSTRAINT jiveRoster_pk PRIMARY KEY (rosterID) CONSTRAINT jiveRoster_pk PRIMARY KEY (rosterID)
); );
CREATE INDEX jiveRoster_username_idx ON jiveRoster (username); CREATE INDEX jiveRoster_username_idx ON jiveRoster (username);
CREATE INDEX jiveRoster_jid_idx ON jiveRoster (jid);
CREATE TABLE jiveRosterGroups ( CREATE TABLE jiveRosterGroups (
...@@ -329,7 +330,7 @@ INSERT INTO jiveID (idType, id) VALUES (18, 1); ...@@ -329,7 +330,7 @@ INSERT INTO jiveID (idType, id) VALUES (18, 1);
INSERT INTO jiveID (idType, id) VALUES (19, 1); INSERT INTO jiveID (idType, id) VALUES (19, 1);
INSERT INTO jiveID (idType, id) VALUES (23, 1); INSERT INTO jiveID (idType, id) VALUES (23, 1);
INSERT INTO jiveVersion (name, version) VALUES ('openfire', 13); INSERT INTO jiveVersion (name, version) VALUES ('openfire', 14);
// Entry for admin user // Entry for admin user
INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate) INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate)
......
...@@ -73,7 +73,8 @@ CREATE TABLE jiveRoster ( ...@@ -73,7 +73,8 @@ CREATE TABLE jiveRoster (
recv TINYINT NOT NULL, recv TINYINT NOT NULL,
nick VARCHAR(255), nick VARCHAR(255),
PRIMARY KEY (rosterID), PRIMARY KEY (rosterID),
INDEX jiveRoster_unameid_idx (username) INDEX jiveRoster_unameid_idx (username),
INDEX jiveRoster_jid_idx (jid(1024))
); );
CREATE TABLE jiveRosterGroups ( CREATE TABLE jiveRosterGroups (
...@@ -318,7 +319,7 @@ INSERT INTO jiveID (idType, id) VALUES (18, 1); ...@@ -318,7 +319,7 @@ INSERT INTO jiveID (idType, id) VALUES (18, 1);
INSERT INTO jiveID (idType, id) VALUES (19, 1); INSERT INTO jiveID (idType, id) VALUES (19, 1);
INSERT INTO jiveID (idType, id) VALUES (23, 1); INSERT INTO jiveID (idType, id) VALUES (23, 1);
INSERT INTO jiveVersion (name, version) VALUES ('openfire', 13); INSERT INTO jiveVersion (name, version) VALUES ('openfire', 14);
# Entry for admin user # Entry for admin user
INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate) INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate)
......
...@@ -60,6 +60,7 @@ CREATE TABLE jiveRoster ( ...@@ -60,6 +60,7 @@ CREATE TABLE jiveRoster (
CONSTRAINT jiveRoster_pk PRIMARY KEY (rosterID) CONSTRAINT jiveRoster_pk PRIMARY KEY (rosterID)
); );
CREATE INDEX jiveRoster_username_idx ON jiveRoster (username ASC); CREATE INDEX jiveRoster_username_idx ON jiveRoster (username ASC);
CREATE INDEX jiveRoster_jid_idx ON jiveRoster (jid ASC);
CREATE TABLE jiveRosterGroups ( CREATE TABLE jiveRosterGroups (
...@@ -325,7 +326,7 @@ INSERT INTO jiveID (idType, id) VALUES (18, 1); ...@@ -325,7 +326,7 @@ INSERT INTO jiveID (idType, id) VALUES (18, 1);
INSERT INTO jiveID (idType, id) VALUES (19, 1); INSERT INTO jiveID (idType, id) VALUES (19, 1);
INSERT INTO jiveID (idType, id) VALUES (23, 1); INSERT INTO jiveID (idType, id) VALUES (23, 1);
INSERT INTO jiveVersion (name, version) VALUES ('openfire', 13); INSERT INTO jiveVersion (name, version) VALUES ('openfire', 14);
-- Entry for admin user -- Entry for admin user
INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate) INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate)
......
...@@ -62,6 +62,7 @@ CREATE TABLE jiveRoster ( ...@@ -62,6 +62,7 @@ CREATE TABLE jiveRoster (
CONSTRAINT jiveRoster_pk PRIMARY KEY (rosterID) CONSTRAINT jiveRoster_pk PRIMARY KEY (rosterID)
); );
CREATE INDEX jiveRoster_username_idx ON jiveRoster (username); CREATE INDEX jiveRoster_username_idx ON jiveRoster (username);
CREATE INDEX jiveRoster_jid_idx ON jiveRoster (jid);
CREATE TABLE jiveRosterGroups ( CREATE TABLE jiveRosterGroups (
...@@ -334,7 +335,7 @@ INSERT INTO jiveID (idType, id) VALUES (18, 1); ...@@ -334,7 +335,7 @@ INSERT INTO jiveID (idType, id) VALUES (18, 1);
INSERT INTO jiveID (idType, id) VALUES (19, 1); INSERT INTO jiveID (idType, id) VALUES (19, 1);
INSERT INTO jiveID (idType, id) VALUES (23, 1); INSERT INTO jiveID (idType, id) VALUES (23, 1);
INSERT INTO jiveVersion (name, version) VALUES ('openfire', 13); INSERT INTO jiveVersion (name, version) VALUES ('openfire', 14);
-- Entry for admin user -- Entry for admin user
INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate) INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate)
......
...@@ -60,6 +60,7 @@ CREATE TABLE jiveRoster ( ...@@ -60,6 +60,7 @@ CREATE TABLE jiveRoster (
CONSTRAINT jiveRoster_pk PRIMARY KEY (rosterID) CONSTRAINT jiveRoster_pk PRIMARY KEY (rosterID)
); );
CREATE INDEX jiveRoster_username_idx ON jiveRoster (username ASC); CREATE INDEX jiveRoster_username_idx ON jiveRoster (username ASC);
CREATE INDEX jiveRoster_jid_idx ON jiveRoster (jid ASC);
CREATE TABLE jiveRosterGroups ( CREATE TABLE jiveRosterGroups (
...@@ -332,7 +333,7 @@ INSERT INTO jiveID (idType, id) VALUES (18, 1); ...@@ -332,7 +333,7 @@ INSERT INTO jiveID (idType, id) VALUES (18, 1);
INSERT INTO jiveID (idType, id) VALUES (19, 1); INSERT INTO jiveID (idType, id) VALUES (19, 1);
INSERT INTO jiveID (idType, id) VALUES (23, 1); INSERT INTO jiveID (idType, id) VALUES (23, 1);
INSERT INTO jiveVersion (name, version) VALUES ('openfire', 13); INSERT INTO jiveVersion (name, version) VALUES ('openfire', 14);
/* Entry for admin user */ /* Entry for admin user */
INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate) INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate)
......
...@@ -332,7 +332,7 @@ INSERT INTO jiveID (idType, id) VALUES (18, 1); ...@@ -332,7 +332,7 @@ INSERT INTO jiveID (idType, id) VALUES (18, 1);
INSERT INTO jiveID (idType, id) VALUES (19, 1); INSERT INTO jiveID (idType, id) VALUES (19, 1);
INSERT INTO jiveID (idType, id) VALUES (23, 1); INSERT INTO jiveID (idType, id) VALUES (23, 1);
INSERT INTO jiveVersion (name, version) VALUES ('openfire', 13); INSERT INTO jiveVersion (name, version) VALUES ('openfire', 14);
/* Entry for admin user */ /* Entry for admin user */
INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate) INSERT INTO jiveUser (username, plainPassword, name, email, creationDate, modificationDate)
......
-- jiveRoster: Add new index
CREATE INDEX jiveR_jid_idx ON jiveRoster (jid ASC);
UPDATE jiveVersion set version=14 where name = 'openfire';
\ No newline at end of file
// jiveRoster: Add new index
CREATE INDEX jiveRoster_jid_idx ON jiveRoster (jid);
UPDATE jiveVersion set version=14 where name = 'openfire';
\ No newline at end of file
# jiveRoster: Add new index
ALTER TABLE jiveRoster ADD INDEX jiveRoster_jid_idx (jid(1024));
UPDATE jiveVersion set version=14 where name = 'openfire';
\ No newline at end of file
-- jiveRoster: Add new index
CREATE INDEX jiveRoster_jid_idx ON jiveRoster (jid ASC);
UPDATE jiveVersion set version=14 where name = 'openfire';
commit;
\ No newline at end of file
-- jiveRoster: Add new index
CREATE INDEX jiveRoster_jid_idx ON jiveRoster (jid);
UPDATE jiveVersion set version=14 where name = 'openfire';
/* jiveRoster: Add new index */
CREATE INDEX jiveRoster_jid_idx ON jiveRoster (jid ASC);
UPDATE jiveVersion set version=14 where name = 'openfire';
\ No newline at end of file
/* jiveRoster: Can not add indexes on TEXT fields in Sybase, just updating version. */
UPDATE jiveVersion set version=14 where name = 'openfire';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment