From 46d995a9832bcae903a6b68b1671b5e8850327bb Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 10 Jan 2022 11:24:32 +0100 Subject: [PATCH] Added index to service elements (modules) --- pandora_console/extras/mr/52.sql | 2 +- pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 3 ++- pandora_console/pandoradb.sql | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pandora_console/extras/mr/52.sql b/pandora_console/extras/mr/52.sql index 81f1436632..d2d5e1be65 100644 --- a/pandora_console/extras/mr/52.sql +++ b/pandora_console/extras/mr/52.sql @@ -1,5 +1,5 @@ START TRANSACTION; ALTER TABLE `tpolicy_queue` MODIFY COLUMN `progress` int(10) NOT NULL default '0'; - +CREATE INDEX `IDX_tservice_element` ON `tservice_element`(`id_service`,`id_agente_modulo`); COMMIT; \ No newline at end of file diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 6f3596cfa3..53cfa31ecb 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -480,7 +480,8 @@ CREATE TABLE IF NOT EXISTS `tservice_element` ( `id_agent` int(10) unsigned NOT NULL default 0, `id_service_child` int(10) unsigned NOT NULL default 0, `id_server_meta` int(10) unsigned NOT NULL default 0, - PRIMARY KEY (`id`) + PRIMARY KEY (`id`), + INDEX `IDX_tservice_element` (`id_service`,`id_agente_modulo`) ) ENGINE=InnoDB COMMENT = 'Table to define the modules and the weights of the modules that define a service' DEFAULT CHARSET=utf8; diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 62cb177d3e..0f766eea65 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -2856,7 +2856,8 @@ CREATE TABLE IF NOT EXISTS `tservice_element` ( `id_service_child` int(10) unsigned NOT NULL default 0, `id_server_meta` int(10) unsigned NOT NULL default 0, `rules` text, - PRIMARY KEY (`id`) + PRIMARY KEY (`id`), + INDEX `IDX_tservice_element` (`id_service`,`id_agente_modulo`) ) ENGINE=InnoDB COMMENT = 'Table to define the modules and the weights of the modules that define a service' DEFAULT CHARSET=utf8;