MySQL Forums
Forum List  »  Performance

Re: How to get acceptable/repeatable performance on huge table
Posted by: Aftab Khan
Date: August 31, 2012 05:43AM

>Mysql uses only the index anyway, so the other column sizes should be irrelevant(?):

Smaller -> more cacheable -> faster

what's the actual table size?

SHOW TABLE STATUS UserVisits\G

>`lastRequest` datetime NOT NULL
Similarly, consider using timestamp, difference 8bytes vs 4 bytes

>In a report table, the following query often takes 2 minutes (which is fine with us), but sometimes "never" finishes (has been going for a few hours when I cancelled):

When this happens, can you take snapshot of SHOW PROCESSLIST\G and SHOW ENGINE INNODB STATUS\G

Also, please recreate PK, as this would help get rid of TEMPORARY table and filesort used by this sql:

alter table UserVisits drop primary key, add primary key (adId,userUId);



Edited 1 time(s). Last edit at 08/31/2012 05:45AM by Aftab Khan.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: How to get acceptable/repeatable performance on huge table
926
August 31, 2012 05:43AM


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.