diff --git a/db_scripts/diff/13042_not_replicated.down b/db_scripts/diff/13042_not_replicated.down new file mode 100644 index 00000000..419416db --- /dev/null +++ b/db_scripts/diff/13042_not_replicated.down @@ -0,0 +1,2 @@ +SET sql_log_bin=0; +ALTER TABLE accounting.cdr DROP KEY stime_idx; diff --git a/db_scripts/diff/13042_not_replicated.up b/db_scripts/diff/13042_not_replicated.up new file mode 100644 index 00000000..f9035355 --- /dev/null +++ b/db_scripts/diff/13042_not_replicated.up @@ -0,0 +1,8 @@ +-- We explicitely don't replicate this statement in order +-- to perform the query only on the corresponding standby +-- node, and we make sure to execute it on both nodes. +-- The reason is that this statement might take quite long +-- and would lock the cdr table on the active node. + +SET sql_log_bin=0; +ALTER TABLE accounting.cdr ADD KEY stime_idx(start_time);