News for hackers. Stuff that matters.
Re:Ruby on Rails and the importance of being stupid by cschneid on Monday May 18, 2009 @10:03PM (#616101)
One optimization is to write big O notation in minimized form. It looks more impressive to write O(n).

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?).

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.