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

parent ca122761
...@@ -43,6 +43,10 @@ ...@@ -43,6 +43,10 @@
<h1> <h1>
Monitoring Plugin Changelog Monitoring Plugin Changelog
</h1> </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> <p><b>1.5.2</b> -- Feb 15, 2016</p>
<ul> <ul>
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
<name>Monitoring Service</name> <name>Monitoring Service</name>
<description>Monitors conversations and statistics of the server.</description> <description>Monitors conversations and statistics of the server.</description>
<author>Jive Software</author> <author>Jive Software</author>
<version>1.5.2</version> <version>1.5.3</version>
<date>2/15/2016</date> <date>2/15/2016</date>
<minServerVersion>4.0.0</minServerVersion> <minServerVersion>4.0.0</minServerVersion>
<databaseKey>monitoring</databaseKey> <databaseKey>monitoring</databaseKey>
<databaseVersion>3</databaseVersion> <databaseVersion>4</databaseVersion>
<adminconsole> <adminconsole>
<tab id="tab-server"> <tab id="tab-server">
......
-- $Revision$ -- $Revision$
-- $Date$ -- $Date$
INSERT INTO ofVersion (name, version) VALUES ('monitoring', 3); INSERT INTO ofVersion (name, version) VALUES ('monitoring', 4);
CREATE TABLE ofConversation ( CREATE TABLE ofConversation (
conversationID INTEGER NOT NULL, conversationID INTEGER NOT NULL,
...@@ -39,6 +39,8 @@ CREATE TABLE ofMessageArchive ( ...@@ -39,6 +39,8 @@ CREATE TABLE ofMessageArchive (
body LONG VARCHAR body LONG VARCHAR
); );
CREATE INDEX ofMessageArchive_con_idx ON ofMessageArchive (conversationID); 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 ( CREATE TABLE ofRRDs (
id VARCHAR(100) NOT NULL, id VARCHAR(100) NOT NULL,
......
// $Revision$ // $Revision$
// $Date$ // $Date$
INSERT INTO ofVersion (name, version) VALUES ('monitoring', 3); INSERT INTO ofVersion (name, version) VALUES ('monitoring', 4);
CREATE TABLE ofConversation ( CREATE TABLE ofConversation (
conversationID BIGINT NOT NULL, conversationID BIGINT NOT NULL,
...@@ -39,6 +39,8 @@ CREATE TABLE ofMessageArchive ( ...@@ -39,6 +39,8 @@ CREATE TABLE ofMessageArchive (
body LONGVARCHAR body LONGVARCHAR
); );
CREATE INDEX ofMessageArchive_con_idx ON ofMessageArchive (conversationID); 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 ( CREATE TABLE ofRRDs (
id VARCHAR(100) NOT NULL, id VARCHAR(100) NOT NULL,
......
# $Revision$ # $Revision$
# $Date$ # $Date$
INSERT INTO ofVersion (name, version) VALUES ('monitoring', 3); INSERT INTO ofVersion (name, version) VALUES ('monitoring', 4);
CREATE TABLE ofConversation ( CREATE TABLE ofConversation (
conversationID BIGINT NOT NULL, conversationID BIGINT NOT NULL,
...@@ -37,7 +37,9 @@ CREATE TABLE ofMessageArchive ( ...@@ -37,7 +37,9 @@ CREATE TABLE ofMessageArchive (
sentDate BIGINT NOT NULL, sentDate BIGINT NOT NULL,
stanza TEXT NULL, stanza TEXT NULL,
body TEXT, 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 ( CREATE TABLE ofRRDs (
......
-- $Revision$ -- $Revision$
-- $Date$ -- $Date$
INSERT INTO ofVersion (name, version) VALUES ('monitoring', 3); INSERT INTO ofVersion (name, version) VALUES ('monitoring', 4);
CREATE TABLE ofConversation ( CREATE TABLE ofConversation (
conversationID INTEGER NOT NULL, conversationID INTEGER NOT NULL,
...@@ -39,6 +39,8 @@ CREATE TABLE ofMessageArchive ( ...@@ -39,6 +39,8 @@ CREATE TABLE ofMessageArchive (
body LONG body LONG
); );
CREATE INDEX ofMessageArchive_con_idx ON ofMessageArchive (conversationID); 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 ( CREATE TABLE ofRRDs (
id VARCHAR2(100) NOT NULL, id VARCHAR2(100) NOT NULL,
......
-- $Revision$ -- $Revision$
-- $Date$ -- $Date$
INSERT INTO ofVersion (name, version) VALUES ('monitoring', 3); INSERT INTO ofVersion (name, version) VALUES ('monitoring', 4);
CREATE TABLE ofConversation ( CREATE TABLE ofConversation (
conversationID INTEGER NOT NULL, conversationID INTEGER NOT NULL,
...@@ -39,6 +39,8 @@ CREATE TABLE ofMessageArchive ( ...@@ -39,6 +39,8 @@ CREATE TABLE ofMessageArchive (
body TEXT body TEXT
); );
CREATE INDEX ofMessageArchive_con_idx ON ofMessageArchive (conversationID); 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 ( CREATE TABLE ofRRDs (
id VARCHAR(100) NOT NULL, id VARCHAR(100) NOT NULL,
......
/* $Revision$ */ /* $Revision$ */
/* $Date$ */ /* $Date$ */
INSERT INTO ofVersion (name, version) VALUES ('monitoring', 3); INSERT INTO ofVersion (name, version) VALUES ('monitoring', 4);
CREATE TABLE ofConversation ( CREATE TABLE ofConversation (
conversationID BIGINT NOT NULL, conversationID BIGINT NOT NULL,
...@@ -39,6 +39,8 @@ CREATE TABLE ofMessageArchive ( ...@@ -39,6 +39,8 @@ CREATE TABLE ofMessageArchive (
body NVARCHAR(MAX) body NVARCHAR(MAX)
); );
CREATE INDEX ofMessageArchive_con_idx ON ofMessageArchive (conversationID); 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 ( CREATE TABLE ofRRDs (
id NVARCHAR(100) NOT NULL, 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