MySQL Forums
Forum List  »  Replication

Preventing unnecessary replication?
Posted by: Dean Richardson
Date: September 06, 2005 10:08AM

Hi -

Have a 3 server setup replicating A->B->C->A etc. Each server, essentially having a master copy of the tables, can perform lots of queries on the "localhost" in response to queries from the HTTP server.

Works very well.

The problem is that lots of queries that we issue don't need to be replicated - but MySQL replpicates them anyway. For example:- create temporary table, insert stuff into the temporary table, manipulate the data in teh tempporary table, read it (select), destroy it. Non of that needs to be replicated.

Unfortunately, whilst some statements (such as repair...) have a "local" attribute, lots of other statements do not. This means lots of servers in the replication-ring end up executing queries for nothing :( particularly bad when the queries are particularly complex and numerous.

How do I get around this ?

In the "create temporary table" example, can I create a table in a database that is set not to replicate? Would this stop the SQL/HTTP statements from being replicated? :-


create table tempstuff.SomeWorkToDo;
insert into tempstuff.SomeWorkToDo select * from where Something;
update tempstuff.SomeWorkToDo set X=Y (etc).
drop table tempstuff.SomeWorkToDo;

Thanks for any help,

Options: ReplyQuote

Written By
Preventing unnecessary replication?
September 06, 2005 10:08AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.