Re:Ruby on Rails and the importance of being stupid
by jdavid on Thursday June 04, 2009 @11:47AM
(#641606)
Cursor?
I was using LIMIT and OFFSET, did you mean something else?
update: I processes 200k-300k rows in a few hours, and since the DB is on the same box, as the php app, there is no need to make this more complicated.
And to try being helpful: do aggregation in the db where possible, be sure indexes are good, play around with the number of rows you process at a time, use joins if appropriate to minimize queries, if your queries are expensive at all use EXPLAIN, depending on the database, look into using a cursor (maybe?).