Re: Slow ActiveRecord - MySQL

zdennis
Fri, 10 Nov 2006 16:20:00 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeremy Kemper wrote:
> On 11/9/06, *zdennis* <zdennis-aRAREQmnvsAAvxtiuMwx3w@public.gmane.org
<mailto:zdennis-aRAREQmnvsAAvxtiuMwx3w@public.gmane.org>> wrote:
>
>     Do you need all of the million records in memory at once?
You''re
>     getting overhead of ActiveRecord creating one million records and
>     keeping them in memory, and your program is probably ending up using
>     swap which is forcing it to take sooo long.
>
>     I often query a few million records, but I don''t pull them all
into
>     memory a once, it''s too inefficient, and not just in ruby.
>
>
> I think he''s saying there are a million rows in the table. A
million
> results grouped by day would mean he has records spanning nearly three
> millenia ;)
>

My bad. =)

Zach
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFVKavMyx0fW1d8G0RAmUTAJ41LSS002nIj25G4I3OvgzJYA2YVACfXKwD
hPzN8yzBDhE1For8BWYS0Xg=8rut
-----END PGP SIGNATURE-----