ActiveRecord...<p>The SQL was pretty simple I believe..select * from location where device_id = ? order by date_added desc limit 6...something like that.<p>Edit: Also, I don't know how much it matters, but MySQL probably only has ~256mb memory available to it (its hosted on a Xen box).