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: Rick James ()
Date: December 22, 2011 11:53PM

SHOW VARIABLES LIKE 'innodb%';
SHOW STATUS LIKE 'Innodb%';
What version?

InnoDB does have periodic pauses while it flushes things to disk. But I generally see the frequency to be hours, not "1-2 times per minute". (Percona's Xtradb has virtually eliminated this issue.)

SHOW CREATE TABLE
SHOW TABLE STATUS
Sort merge passes should happen on large sorts, no 4000-row sorts -- unless
* Certain settings are unreasonably low;
* The table rows are really fat (big TEXT/BLOG field(s)).

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;

Wouldn't this do the same as most of your code?:
UPDATE auctions SET 
        end_time = ADDTIME(GREATEST(end_time, NOW()), var_time_increment),
        price = price+var_price_increment, leader_id = var_leader_id, 
        modified = NOW()
    WHERE id = var_auction_id
      AND closed = 0;
(or maybe it should be LEAST())

Options: ReplyQuote


Subject Views Written By Posted
Sort_merge_passes increasing at 38 per minute... 1408 phil yune 12/18/2011 09:15AM
Re: Sort_merge_passes increasing at 38 per minute... 449 Jørgen Løland 12/19/2011 06:55AM
Re: Sort_merge_passes increasing at 38 per minute... 508 phil yune 12/19/2011 07:36AM
Re: Sort_merge_passes increasing at 38 per minute... 492 Jørgen Løland 12/20/2011 03:10AM
Re: Sort_merge_passes increasing at 38 per minute... 487 phil yune 12/20/2011 04:07PM
Re: Sort_merge_passes increasing at 38 per minute... 534 Jørgen Løland 12/21/2011 02:58AM
Re: Sort_merge_passes increasing at 38 per minute... 570 phil yune 12/21/2011 07:25PM
Re: Sort_merge_passes increasing at 38 per minute... 443 Jørgen Løland 12/22/2011 02:34AM
Re: Sort_merge_passes increasing at 38 per minute... 690 Rick James 12/22/2011 11:53PM
Re: Sort_merge_passes increasing at 38 per minute... 448 phil yune 12/23/2011 07:14AM
Re: Sort_merge_passes increasing at 38 per minute... 432 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.