MySQL Forums
Forum List  »  Performance

Re: Is my hardware slow or is it MySQL performance?
Posted by: Brandon Bates
Date: October 15, 2005 02:59PM

It doesn't look like from the tabledef that you have an index on that column. Which means that MySQL MUST do a table scan (SLOW and about the same in ANY database system, including ORACLE, MSSQL, doesn't matter). When you have an index and you are querying col='xyz' or col LIKE 'zyx%' then the performance with an index is MASSIVE since it only has to scan the smaller INDEX file not the TABLE (even if all the rows in the table had the same value for some reason). However LIKE ='%xxx' with the wildcard at the beginning can't use an index so it table scans, so be aware. Also for large tables I found it helpful to have PACK_KEYS=1 in the tabledef since it helps eliminate the disk bottleneck on a large index file (depending on how fast your disks are, you might get CPU bound instead of DISK bound, so test it.) Your query should return in a few seconds or less.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Is my hardware slow or is it MySQL performance?
1546
October 15, 2005 02:59PM


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.