Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

We need to run some very ugly queries on a MySQL replication cluster.

Does anyone know if creating a view directly on the slave will break the replication of the other, otherwise untouched data synced with the master?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

This will work fine. The only caveat is that if you, in the future, create a view on the master with the same view name, in the same schema, replication will stop due to the conflict.

Another potentially useful thing you can do -- quite safely -- on a slave server is adding indexes to base tables to help your reporting queries, even if the same index wouldn't be needed or justified on the master. Of course, you should not add unique indexes or foreign keys directly to the slave, since these could cause conflicts and don't really make sense when not on the master ...but ordinary single and multi-column indexes are also safe to add directly to a slave.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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