MySQL Forums :: Performance :: Which strategy is better to traverse a big table?


Advanced Search

Which strategy is better to traverse a big table?
Posted by: yanlin peng ()
Date: February 23, 2009 01:58AM

I am asking kind suggestions on how to go through a big (>10 million rows) table.
The database type is MYISAM. The table has a PRIMARY KEY on a AUTO_INCREMENT column and an index on (feedback_time, feedback_id, feedback_user).
I want to go through the whole table in the order of feedback_time, feedback_id, feedback_user from my c program.

I am a newbie. So I have this maybe silly question: should I get the whole table at once or chunk by chunk?
Precisely, should I do:
SELECT * FROM feedback ORDER BY feedback_time, feedback_id, feedback_user.
or:
SELECT * FROM feedback ORDER BY feedback_time, feedback_id, feedback_user LIMIT offset, rows
Which way is faster to go through a big table?

Thanks!

Options: ReplyQuote


Subject Views Written By Posted
Which strategy is better to traverse a big table? 3429 yanlin peng 02/23/2009 01:58AM
Re: Which strategy is better to traverse a big table? 1679 aftab khan 02/23/2009 07:04AM
Re: Which strategy is better to traverse a big table? 1570 Rick James 02/24/2009 11:29AM
Re: Which strategy is better to traverse a big table? 1668 yanlin peng 02/25/2009 02:25PM


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.