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

seangeo wrote:
> The other option of paginating suffered from severe degradation of
> performance due to MySQL performance being extremely poor with large
> values of :offset.  For example, processing the table in batches of
> 100, at the beginning of the table a batch would take about 0.01s to
> complete, towards the end of the table batches were taking around 3
> seconds to complete.  The performance seems to degrade linearly so that
> processing the table takes about 2.5 hours; if initial performance was
> maintained it would be closer to 1-2 minutes.  So paginating through a
> large table is not a good solution either, however it is the only one
> of the two that actually works.

Did you try indexing the columns you are filtering by? I am by no means
a MySQL guru, but I see no reason why LIMIT x,y should incur any
performance penalty as the offset increases, unless the engine actually
has to skip over all previous :offset results.

- --
Istvan Hoka

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

iD8DBQFFShA4fQsYrmlBvk4RAozCAJ0S5B4iNJiMApA7E84cSC0IwzYwfgCfbNH/
0A4DBjCGeLApMNncbIqMj5g=
=EOr4
-----END PGP SIGNATURE-----

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core
-~----------~----~----~----~------~----~------~--~---

Reply via email to