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? :-

my.cnf
replicate-ignore-db=tempstuff

SQL/HTTP:
create table tempstuff.SomeWorkToDo;
insert into tempstuff.SomeWorkToDo select * from users.data where Something;
update tempstuff.SomeWorkToDo set X=Y (etc).
drop table tempstuff.SomeWorkToDo;

Thanks for any help,
Dean

Options: ReplyQuote


Subject
Views
Written By
Posted
Preventing unnecessary replication?
2347
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.