mirror of https://github.com/Icinga/icinga2.git
DB IDO: Add an index for CV session delete
The DELETE statement might become painfully slow on large installations. refs #10436
This commit is contained in:
parent
9485938d32
commit
4d784dd075
|
@ -1637,6 +1637,10 @@ CREATE INDEX sla_idx_obj ON icinga_objects (objecttype_id, is_active, name1);
|
|||
-- #4985
|
||||
CREATE INDEX commenthistory_delete_idx ON icinga_commenthistory (instance_id, comment_time, internal_comment_id);
|
||||
|
||||
-- #10436
|
||||
CREATE INDEX cv_session_del_idx ON icinga_customvariables (session_token);
|
||||
CREATE INDEX cvs_session_del_idx ON icinga_customvariablestatus (session_token);
|
||||
|
||||
-- -----------------------------------------
|
||||
-- set dbversion
|
||||
-- -----------------------------------------
|
||||
|
|
|
@ -55,6 +55,9 @@ ALTER TABLE icinga_hoststatus ADD COLUMN original_attributes TEXT character set
|
|||
ALTER TABLE icinga_customvariables ADD COLUMN session_token varchar(512) character set latin1 default NULL;
|
||||
ALTER TABLE icinga_customvariablestatus ADD COLUMN session_token varchar(512) character set latin1 default NULL;
|
||||
|
||||
CREATE INDEX cv_session_del_idx ON icinga_customvariables (session_token);
|
||||
CREATE INDEX cvs_session_del_idx ON icinga_customvariablestatus (session_token);
|
||||
|
||||
-- -----------------------------------------
|
||||
-- update dbversion
|
||||
-- -----------------------------------------
|
||||
|
|
|
@ -1666,6 +1666,10 @@ CREATE INDEX sla_idx_obj ON icinga_objects (objecttype_id, is_active, name1);
|
|||
-- #4985
|
||||
CREATE INDEX commenthistory_delete_idx ON icinga_commenthistory (instance_id, comment_time, internal_comment_id);
|
||||
|
||||
-- #10436
|
||||
CREATE INDEX cv_session_del_idx ON icinga_customvariables (session_token);
|
||||
CREATE INDEX cvs_session_del_idx ON icinga_customvariablestatus (session_token);
|
||||
|
||||
-- -----------------------------------------
|
||||
-- set dbversion
|
||||
-- -----------------------------------------
|
||||
|
|
|
@ -163,6 +163,9 @@ ALTER TABLE icinga_hoststatus ADD COLUMN original_attributes TEXT default NULL;
|
|||
ALTER TABLE icinga_customvariables ADD COLUMN session_token TEXT default NULL;
|
||||
ALTER TABLE icinga_customvariablestatus ADD COLUMN session_token TEXT default NULL;
|
||||
|
||||
CREATE INDEX cv_session_del_idx ON icinga_customvariables (session_token);
|
||||
CREATE INDEX cvs_session_del_idx ON icinga_customvariablestatus (session_token);
|
||||
|
||||
-- -----------------------------------------
|
||||
-- update dbversion
|
||||
-- -----------------------------------------
|
||||
|
|
Loading…
Reference in New Issue