MySQL Forums
Forum List  »  Replication

[Replication] Big Joins do not get replicated
Posted by: Mark Müller
Date: April 07, 2005 02:28AM

Hi everybody,

maybe this has been asked before so bare with me if I do it again.

I have a mysql 4.0.x setup with one master and 3 slaves (linux 2.6.x).

One query I execute to regenerate a complete table (kind of "view" emulation) contains 6 LEFT JOINS.
Believe me, they ARE neccessary, so no discussion about that :)

For replication on the Master I use a shell script which pipes TRUNCATE TABLE ... and INSERT INTO SELECT ... directy to the mysql cli.

This works find on the Master.
The Slave only replicates the TRUNCATE which is ... very very bad :)

The Slaves DO NOT replicate the INSERT because:
"The SELECT would examine more rows than MAX_JOIN_SIZE. Check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is ok" (error Log)

I think I read somewhere that SET command replication is planned for Mysql 5 which is too late of cause.

Can someone think of a way to accomplish this without my work around I currently use?

TRUNCATE
INSERT INTO
mysqldump | mysql

Thank for reading this through
Mark

Options: ReplyQuote


Subject
Views
Written By
Posted
[Replication] Big Joins do not get replicated
2914
April 07, 2005 02:28AM


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.