Re: How to speed up query of indexed column with 5M rows?
You've got 6 columns and 5 indexes. Generally speaking that's too much. Notice that your index file (MYI) is larger than the table itself (MYD). Cut down on the indexes. Also, you're using the full name column as an index, that's up to 255 chars! Cut that down and use a partial index.
KEY `flow_nameindex` (name(15)) -- Uses the first 15 chars of the column.
That should speed up your queries exponentially. If you want to take it a step further, make the name column a char(255). Yes, it will take up more space but will be much faster for I/O. This last change will only have a speed improvement for MyISAM tables.
Please respond back with the results of your changes.
Thanks,
Larry Kagan
Edited 2 time(s). Last edit at 10/09/2006 08:14AM by Larry Kagan.
Subject
Views
Written By
Posted
24520
October 09, 2006 06:34AM
Re: How to speed up query of indexed column with 5M rows?
9020
October 09, 2006 08:11AM
7572
October 10, 2006 12:23AM
6866
October 10, 2006 08:45AM
6578
October 12, 2006 07:57PM
6543
October 09, 2006 09:40AM
6174
October 09, 2006 08:39PM
5153
October 09, 2006 07:54PM
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.