Skip navigation links

MySQL Forums :: Performance :: Sort_merge_passes increasing at 38 per minute...


Advanced Search

Re: Sort_merge_passes increasing at 38 per minute...
Posted by: phil yune ()
Date: December 19, 2011 07:36AM

I actually do have a query that's acting weird. The transaction below usually takes < 1s, but it will hit > 2s 1-2 times per minute. The table is really small - 4000 rows or so. InnoDB with REPEATABLE READ. The same row gets read 10 times per minute or so. I need some help figuring out why it spikes to > 2s when it's only a 4000 row table. Thanks!!

START TRANSACTION;
SELECT end_time INTO currentEndTime FROM auctions WHERE id=var_auction_id;

IF (ADDTIME(currentEndTime , var_time_increment) < NOW()) THEN
UPDATE auctions SET end_time = ADDTIME(NOW(), var_time_increment), price = price+var_price_increment, leader_id = var_leader_id, modified = NOW() WHERE id = var_auction_id AND closed = 0;
ELSE
UPDATE auctions SET end_time = ADDTIME(end_time, var_time_increment), price = price+var_price_increment, leader_id = var_leader_id, modified = NOW() WHERE id = var_auction_id AND closed = 0;
END IF;
SELECT ROW_COUNT() INTO myRowCount;

IF (_error) THEN
ROLLBACK;
ELSE
SET var_return = myRowCount;
COMMIT;
END IF;

Options: ReplyQuote


Subject Views Written By Posted
Sort_merge_passes increasing at 38 per minute... 1441 phil yune 12/18/2011 09:15AM
Re: Sort_merge_passes increasing at 38 per minute... 460 Jørgen Løland 12/19/2011 06:55AM
Re: Sort_merge_passes increasing at 38 per minute... 527 phil yune 12/19/2011 07:36AM
Re: Sort_merge_passes increasing at 38 per minute... 508 Jørgen Løland 12/20/2011 03:10AM
Re: Sort_merge_passes increasing at 38 per minute... 501 phil yune 12/20/2011 04:07PM
Re: Sort_merge_passes increasing at 38 per minute... 543 Jørgen Løland 12/21/2011 02:58AM
Re: Sort_merge_passes increasing at 38 per minute... 594 phil yune 12/21/2011 07:25PM
Re: Sort_merge_passes increasing at 38 per minute... 452 Jørgen Løland 12/22/2011 02:34AM
Re: Sort_merge_passes increasing at 38 per minute... 708 Rick James 12/22/2011 11:53PM
Re: Sort_merge_passes increasing at 38 per minute... 458 phil yune 12/23/2011 07:14AM
Re: Sort_merge_passes increasing at 38 per minute... 441 Rick James 12/24/2011 08:58AM


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.