Module: kamailio
Branch: master
Commit: e30cbd0010149a595ef7c11963a785ad784ea5c2
URL: https://github.com/kamailio/kamailio/commit/e30cbd0010149a595ef7c11963a785a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-12-08T08:42:00+01:00
kamctl: regenerate db creation scripts
---
Modified: utils/kamctl/db_sqlite/topos-create.sql
Modified: utils/kamctl/mysql/topos-create.sql
Modified: utils/kamctl/oracle/topos-create.sql
Modified: utils/kamctl/postgres/topos-create.sql
---
Diff: https://github.com/kamailio/kamailio/commit/e30cbd0010149a595ef7c11963a785a…
Patch: https://github.com/kamailio/kamailio/commit/e30cbd0010149a595ef7c11963a785a…
---
diff --git a/utils/kamctl/db_sqlite/topos-create.sql b/utils/kamctl/db_sqlite/topos-create.sql
index d36c5b62ac..b39af68335 100644
--- a/utils/kamctl/db_sqlite/topos-create.sql
+++ b/utils/kamctl/db_sqlite/topos-create.sql
@@ -27,6 +27,8 @@ CREATE TABLE topos_d (
CREATE INDEX topos_d_rectime_idx ON topos_d (rectime);
CREATE INDEX topos_d_a_callid_idx ON topos_d (a_callid);
+CREATE INDEX topos_d_a_uuid_idx ON topos_d (a_uuid);
+CREATE INDEX topos_d_b_uuid_idx ON topos_d (b_uuid);
INSERT INTO version (table_name, table_version) values ('topos_d','1');
@@ -60,6 +62,8 @@ CREATE TABLE topos_t (
CREATE INDEX topos_t_rectime_idx ON topos_t (rectime);
CREATE INDEX topos_t_a_callid_idx ON topos_t (a_callid);
+CREATE INDEX topos_t_x_vbranch_idx ON topos_t (x_vbranch);
+CREATE INDEX topos_t_a_uuid_idx ON topos_t (a_uuid);
INSERT INTO version (table_name, table_version) values ('topos_t','1');
diff --git a/utils/kamctl/mysql/topos-create.sql b/utils/kamctl/mysql/topos-create.sql
index db305752c6..1d35b2b83d 100644
--- a/utils/kamctl/mysql/topos-create.sql
+++ b/utils/kamctl/mysql/topos-create.sql
@@ -27,6 +27,8 @@ CREATE TABLE `topos_d` (
CREATE INDEX rectime_idx ON topos_d (`rectime`);
CREATE INDEX a_callid_idx ON topos_d (`a_callid`);
+CREATE INDEX a_uuid_idx ON topos_d (`a_uuid`);
+CREATE INDEX b_uuid_idx ON topos_d (`b_uuid`);
INSERT INTO version (table_name, table_version) values ('topos_d','1');
@@ -60,6 +62,8 @@ CREATE TABLE `topos_t` (
CREATE INDEX rectime_idx ON topos_t (`rectime`);
CREATE INDEX a_callid_idx ON topos_t (`a_callid`);
+CREATE INDEX x_vbranch_idx ON topos_t (`x_vbranch`);
+CREATE INDEX a_uuid_idx ON topos_t (`a_uuid`);
INSERT INTO version (table_name, table_version) values ('topos_t','1');
diff --git a/utils/kamctl/oracle/topos-create.sql b/utils/kamctl/oracle/topos-create.sql
index b0f0aa47d5..f7dc8097ce 100644
--- a/utils/kamctl/oracle/topos-create.sql
+++ b/utils/kamctl/oracle/topos-create.sql
@@ -35,6 +35,8 @@ BEGIN map2users('topos_d'); END;
/
CREATE INDEX topos_d_rectime_idx ON topos_d (rectime);
CREATE INDEX topos_d_a_callid_idx ON topos_d (a_callid);
+CREATE INDEX topos_d_a_uuid_idx ON topos_d (a_uuid);
+CREATE INDEX topos_d_b_uuid_idx ON topos_d (b_uuid);
INSERT INTO version (table_name, table_version) values ('topos_d','1');
@@ -76,6 +78,8 @@ BEGIN map2users('topos_t'); END;
/
CREATE INDEX topos_t_rectime_idx ON topos_t (rectime);
CREATE INDEX topos_t_a_callid_idx ON topos_t (a_callid);
+CREATE INDEX topos_t_x_vbranch_idx ON topos_t (x_vbranch);
+CREATE INDEX topos_t_a_uuid_idx ON topos_t (a_uuid);
INSERT INTO version (table_name, table_version) values ('topos_t','1');
diff --git a/utils/kamctl/postgres/topos-create.sql b/utils/kamctl/postgres/topos-create.sql
index d98dda3fad..a72be15622 100644
--- a/utils/kamctl/postgres/topos-create.sql
+++ b/utils/kamctl/postgres/topos-create.sql
@@ -27,6 +27,8 @@ CREATE TABLE topos_d (
CREATE INDEX topos_d_rectime_idx ON topos_d (rectime);
CREATE INDEX topos_d_a_callid_idx ON topos_d (a_callid);
+CREATE INDEX topos_d_a_uuid_idx ON topos_d (a_uuid);
+CREATE INDEX topos_d_b_uuid_idx ON topos_d (b_uuid);
INSERT INTO version (table_name, table_version) values ('topos_d','1');
@@ -60,6 +62,8 @@ CREATE TABLE topos_t (
CREATE INDEX topos_t_rectime_idx ON topos_t (rectime);
CREATE INDEX topos_t_a_callid_idx ON topos_t (a_callid);
+CREATE INDEX topos_t_x_vbranch_idx ON topos_t (x_vbranch);
+CREATE INDEX topos_t_a_uuid_idx ON topos_t (a_uuid);
INSERT INTO version (table_name, table_version) values ('topos_t','1');
#### Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
Using topos module in production I have found slow queries in MySQL.
After analyzing it I have add indexes to topos_t and topos_d tables.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1355
-- Commit Summary --
* schema: add indexes to topos Mysql tables (#13)
-- File Changes --
M src/lib/srdb1/schema/topos_d.xml (10)
M src/lib/srdb1/schema/topos_t.xml (10)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1355.patchhttps://github.com/kamailio/kamailio/pull/1355.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1355