2

I have this cluster where master and slave uses same indexes but one of the slaves has some extra indexes (large machine which runs some analytics queries).

So I have to maintain two sets of indexes. But this usually creates a problem when I want to recreate an index on master that was already present on the analytics slave.

Can I stop replication of create/drop index statements on one of the slaves so that I can manage them manually?

0

I don't believe there is a way to ignore specific DDL (or any DDL?). If creating an existing index, it should throw an error, which you should be able to ignore on your analytics-slave.

Alternatively, don't replicate Index Creations.

set log_bin=0; 
create index name on table;
set log_bin=1; 

Create a wrapper script to apply to master and slave as needed.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.