MySQL Forums
Forum List  »  MyISAM

Doing a select on a large table
Posted by: Kris Peeters
Date: September 07, 2006 02:04AM

I'm having troubles doing an ordinary select on a large MyISAM table (26 milion records).

I have to walk through the entire table and return the next thousand lines each time, so I'm not using a WHERE clause. I just adjust the LIMIT parameters in every step. I wrote a shell script for this, and it works fine.

When I select the first couple of thousand lines, mysql returned them in no time. But now, I'm selecting from near the end of the table, and it takes 2000 seconds before I get results.

I performed an EXPLAIN on these queries, and because I'm not using a WHERE clause, MySQL doesn't use any keys. Does this mean it has to iterate over the first 20 milion records, just to get the 20 000 001st?

Has anybody got an idea how I can boost up the speed of those queries?

Thanks a lot !!

Options: ReplyQuote


Subject
Views
Written By
Posted
Doing a select on a large table
7523
September 07, 2006 02:04AM
3306
September 07, 2006 06:37AM
3314
September 18, 2006 01:58AM
3294
September 18, 2006 07:00PM
3131
September 18, 2006 08:32PM


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.