[sr-dev] git:master: modules_k/presence Added an index to active_watchers table

Anca Vamanu anca.vamanu at 1and1.ro
Thu Mar 15 17:50:01 CET 2012


Module: sip-router
Branch: master
Commit: 25ce428ab1b165654e35b3433060beab0effdd9b
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=25ce428ab1b165654e35b3433060beab0effdd9b

Author: Anca Vamanu <anca.vamanu at 1and1.ro>
Committer: Anca Vamanu <anca.vamanu at 1and1.ro>
Date:   Thu Mar 15 18:47:56 2012 +0200

modules_k/presence Added an index to active_watchers table

For DB_ONLY mode an index on presentity_uri is needed.
(Used for queries when sending Notifies as a consequence of a received
Publish)

---

 lib/srdb1/schema/pr_active_watchers.xml    |    6 ++++++
 utils/kamctl/db_sqlite/presence-create.sql |    1 +
 utils/kamctl/mysql/presence-create.sql     |    1 +
 utils/kamctl/oracle/presence-create.sql    |    1 +
 utils/kamctl/postgres/presence-create.sql  |    1 +
 5 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/lib/srdb1/schema/pr_active_watchers.xml b/lib/srdb1/schema/pr_active_watchers.xml
index 73d5e2f..b638e0d 100644
--- a/lib/srdb1/schema/pr_active_watchers.xml
+++ b/lib/srdb1/schema/pr_active_watchers.xml
@@ -185,4 +185,10 @@
         <colref linkend="expires"/>
     </index>
 
+    <index>
+        <name>active_watchers_pres</name>
+        <colref linkend="presentity_uri"/>
+        <description>This index is needed only if you use DB_ONLY mode.</description>
+    </index>
+
 </table>
diff --git a/utils/kamctl/db_sqlite/presence-create.sql b/utils/kamctl/db_sqlite/presence-create.sql
index 8a4a07c..24d12b2 100644
--- a/utils/kamctl/db_sqlite/presence-create.sql
+++ b/utils/kamctl/db_sqlite/presence-create.sql
@@ -42,6 +42,7 @@ CREATE TABLE active_watchers (
 );
 
 CREATE INDEX active_watchers_active_watchers_expires ON active_watchers (expires);
+CREATE INDEX active_watchers_active_watchers_pres ON active_watchers (presentity_uri);
 
 INSERT INTO version (table_name, table_version) values ('watchers','3');
 CREATE TABLE watchers (
diff --git a/utils/kamctl/mysql/presence-create.sql b/utils/kamctl/mysql/presence-create.sql
index 1ba1e05..7a03705 100644
--- a/utils/kamctl/mysql/presence-create.sql
+++ b/utils/kamctl/mysql/presence-create.sql
@@ -42,6 +42,7 @@ CREATE TABLE active_watchers (
 ) ENGINE=MyISAM;
 
 CREATE INDEX active_watchers_expires ON active_watchers (expires);
+CREATE INDEX active_watchers_pres ON active_watchers (presentity_uri);
 
 INSERT INTO version (table_name, table_version) values ('watchers','3');
 CREATE TABLE watchers (
diff --git a/utils/kamctl/oracle/presence-create.sql b/utils/kamctl/oracle/presence-create.sql
index 2e9c932..e445dca 100644
--- a/utils/kamctl/oracle/presence-create.sql
+++ b/utils/kamctl/oracle/presence-create.sql
@@ -58,6 +58,7 @@ END active_watchers_tr;
 BEGIN map2users('active_watchers'); END;
 /
 CREATE INDEX ORA_active_watchers_expires  ON active_watchers (expires);
+CREATE INDEX ORA_active_watchers_pres  ON active_watchers (presentity_uri);
 
 INSERT INTO version (table_name, table_version) values ('watchers','3');
 CREATE TABLE watchers (
diff --git a/utils/kamctl/postgres/presence-create.sql b/utils/kamctl/postgres/presence-create.sql
index 8be1dcc..b36a407 100644
--- a/utils/kamctl/postgres/presence-create.sql
+++ b/utils/kamctl/postgres/presence-create.sql
@@ -42,6 +42,7 @@ CREATE TABLE active_watchers (
 );
 
 CREATE INDEX active_watchers_active_watchers_expires ON active_watchers (expires);
+CREATE INDEX active_watchers_active_watchers_pres ON active_watchers (presentity_uri);
 
 INSERT INTO version (table_name, table_version) values ('watchers','3');
 CREATE TABLE watchers (




More information about the sr-dev mailing list