OF-1117: Improve performance of monitoring plugin by adding indexes.

parent ca122761
......@@ -43,6 +43,10 @@
<h1>
Monitoring Plugin Changelog
</h1>
<p><b>1.5.3</b> -- March 22, 2016</p>
<ul>
<li>[<a href='https://igniterealtime.org/issues/browse/OF-1117'>OF-1117</a>] - Improve performance of monitoring plugin by adding database indexes.</li>
</ul>
<p><b>1.5.2</b> -- Feb 15, 2016</p>
<ul>
......
......@@ -5,11 +5,11 @@
<name>Monitoring Service</name>
<description>Monitors conversations and statistics of the server.</description>
<author>Jive Software</author>
<version>1.5.2</version>
<version>1.5.3</version>
<date>2/15/2016</date>
<minServerVersion>4.0.0</minServerVersion>
<databaseKey>monitoring</databaseKey>
<databaseVersion>3</databaseVersion>
<databaseVersion>4</databaseVersion>
<adminconsole>
<tab id="tab-server">
......
-- $Revision$
-- $Date$
INSERT INTO ofVersion (name, version) VALUES ('monitoring', 3);
INSERT INTO ofVersion (name, version) VALUES ('monitoring', 4);
CREATE TABLE ofConversation (
conversationID INTEGER NOT NULL,
......@@ -39,6 +39,8 @@ CREATE TABLE ofMessageArchive (
body LONG VARCHAR
);
CREATE INDEX ofMessageArchive_con_idx ON ofMessageArchive (conversationID);
CREATE INDEX ofMessageArchive_fromjid_idx ON ofMessageArchive (fromJID);
CREATE INDEX ofMessageArchive_tojid_idx ON ofMessageArchive (toJID);
CREATE TABLE ofRRDs (
id VARCHAR(100) NOT NULL,
......
// $Revision$
// $Date$
INSERT INTO ofVersion (name, version) VALUES ('monitoring', 3);
INSERT INTO ofVersion (name, version) VALUES ('monitoring', 4);
CREATE TABLE ofConversation (
conversationID BIGINT NOT NULL,
......@@ -39,6 +39,8 @@ CREATE TABLE ofMessageArchive (
body LONGVARCHAR
);
CREATE INDEX ofMessageArchive_con_idx ON ofMessageArchive (conversationID);
CREATE INDEX ofMessageArchive_fromjid_idx ON ofMessageArchive (fromJID);
CREATE INDEX ofMessageArchive_tojid_idx ON ofMessageArchive (toJID);
CREATE TABLE ofRRDs (
id VARCHAR(100) NOT NULL,
......
# $Revision$
# $Date$
INSERT INTO ofVersion (name, version) VALUES ('monitoring', 3);
INSERT INTO ofVersion (name, version) VALUES ('monitoring', 4);
CREATE TABLE ofConversation (
conversationID BIGINT NOT NULL,
......@@ -37,7 +37,9 @@ CREATE TABLE ofMessageArchive (
sentDate BIGINT NOT NULL,
stanza TEXT NULL,
body TEXT,
INDEX ofMessageArchive_con_idx (conversationID)
INDEX ofMessageArchive_con_idx (conversationID),
INDEX ofMessageArchive_fromjid_idx (fromJID),
INDEX ofMessageArchive_tojid_idx (toJID)
);
CREATE TABLE ofRRDs (
......
-- $Revision$
-- $Date$
INSERT INTO ofVersion (name, version) VALUES ('monitoring', 3);
INSERT INTO ofVersion (name, version) VALUES ('monitoring', 4);
CREATE TABLE ofConversation (
conversationID INTEGER NOT NULL,
......@@ -39,6 +39,8 @@ CREATE TABLE ofMessageArchive (
body LONG
);
CREATE INDEX ofMessageArchive_con_idx ON ofMessageArchive (conversationID);
CREATE INDEX ofMessageArchive_fromjid_idx ON ofMessageArchive (fromJID);
CREATE INDEX ofMessageArchive_tojid_idx ON ofMessageArchive (toJID);
CREATE TABLE ofRRDs (
id VARCHAR2(100) NOT NULL,
......
-- $Revision$
-- $Date$
INSERT INTO ofVersion (name, version) VALUES ('monitoring', 3);
INSERT INTO ofVersion (name, version) VALUES ('monitoring', 4);
CREATE TABLE ofConversation (
conversationID INTEGER NOT NULL,
......@@ -39,6 +39,8 @@ CREATE TABLE ofMessageArchive (
body TEXT
);
CREATE INDEX ofMessageArchive_con_idx ON ofMessageArchive (conversationID);
CREATE INDEX ofMessageArchive_fromjid_idx ON ofMessageArchive (fromJID);
CREATE INDEX ofMessageArchive_tojid_idx ON ofMessageArchive (toJID);
CREATE TABLE ofRRDs (
id VARCHAR(100) NOT NULL,
......
/* $Revision$ */
/* $Date$ */
INSERT INTO ofVersion (name, version) VALUES ('monitoring', 3);
INSERT INTO ofVersion (name, version) VALUES ('monitoring', 4);
CREATE TABLE ofConversation (
conversationID BIGINT NOT NULL,
......@@ -39,6 +39,8 @@ CREATE TABLE ofMessageArchive (
body NVARCHAR(MAX)
);
CREATE INDEX ofMessageArchive_con_idx ON ofMessageArchive (conversationID);
CREATE INDEX ofMessageArchive_fromjid_idx ON ofMessageArchive (fromJID);
CREATE INDEX ofMessageArchive_tojid_idx ON ofMessageArchive (toJID);
CREATE TABLE ofRRDs (
id NVARCHAR(100) NOT NULL,
......
-- $Revision$
-- $Date$
CREATE INDEX ofMessageArchive_fromjid_idx ON ofMessageArchive (fromJID);
CREATE INDEX ofMessageArchive_tojid_idx ON ofMessageArchive (toJID);
-- Update database version
UPDATE ofVersion SET version = 4 WHERE name = 'monitoring';
-- $Revision$
-- $Date$
CREATE INDEX ofMessageArchive_fromjid_idx ON ofMessageArchive (fromJID);
CREATE INDEX ofMessageArchive_tojid_idx ON ofMessageArchive (toJID);
-- Update database version
UPDATE ofVersion SET version = 4 WHERE name = 'monitoring';
-- $Revision$
-- $Date$
ALTER TABLE ofMessageArchive ADD INDEX ofMessageArchive_fromjid_idx (fromJID);
ALTER TABLE ofMessageArchive ADD INDEX ofMessageArchive_tojid_idx (toJID);
-- Update database version
UPDATE ofVersion SET version = 4 WHERE name = 'monitoring';
-- $Revision$
-- $Date$
CREATE INDEX ofMessageArchive_fromjid_idx ON ofMessageArchive (fromJID);
CREATE INDEX ofMessageArchive_tojid_idx ON ofMessageArchive (toJID);
-- Update database version
UPDATE ofVersion SET version = 4 WHERE name = 'monitoring';
COMMIT;
-- $Revision$
-- $Date$
CREATE INDEX ofMessageArchive_fromjid_idx ON ofMessageArchive (fromJID);
CREATE INDEX ofMessageArchive_tojid_idx ON ofMessageArchive (toJID);
-- Update database version
UPDATE ofVersion SET version = 4 WHERE name = 'monitoring';
-- $Revision$
-- $Date$
CREATE INDEX ofMessageArchive_fromjid_idx ON ofMessageArchive (fromJID);
CREATE INDEX ofMessageArchive_tojid_idx ON ofMessageArchive (toJID);
-- Update database version
UPDATE ofVersion SET version = 4 WHERE name = 'monitoring';
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