MySQL Forums
Forum List  »  NDB clusters

Example of Cluster SLOWER than InnoDB -- help?
Posted by: John Muehlhausen
Date: December 07, 2004 11:48AM

Hi all,

I am inserting a message into a Cluster table and then sending a notification to the receiver (if any). The receiver then reads and deletes the message record.

If there is no receiver then a single node Cluster (on a Powerbook G4 / OS X) is the same speed at inserting as InnoDB -- about 100 transactions per second (which seems slow to me).

If there is a receiver then InnoDB performance remains good but the Cluster performance slows to 10 messages per second!! :-(

Here is basically what is happening:


set autocommit = 0
select put_seqnum from <queueName>_state for update
update <queueName>_state set put_seqnum = <next>
replace into <queueName>_messages (seqnum, message) values (..., ...)
update <queueName>_state set dirty = 1


set autocommit = 1
select dirty from <queueName>_state
// if not dirty then wait (with timeout) for notification
select get_seqnum from <queueName>_state
select seqnum, message from <queueName>_messages where seqnum > ... order by seqnum
set autocommit = 0
update <queueName>_state set get_seqnum=...
delete from <queueName>_messages where seqnum=...
set autocommit = 1
update <queueName>_state set dirty = if( put_seqnum > get_seqnum, 1, 0)



Options: ReplyQuote

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.