On 5/17/07, Hongli Lai <[EMAIL PROTECTED]> wrote: > > > I tested this with MySQL. I can't have unlimited number of prepared > statements. After a certain threshold, queries will fail.
It would be good to know what is this treshold. ... according to benchmarks, caching > prepared statements doesn't improve performance at all on MySQL. It is possible that there is a performance boost on raw queries, but that it's not visible because the ActiveRecord object instantiation time is an order of magnitude higher. Also, simple queries against a database that has a miniscule amount of records don't benefit much from having a cached execution plan. You could first benchmark several hundred thousand INSERTs, then UPDATE those records, then query those tables with SELECTs with as much conditions and joins you could throw in. Don't forget the database indexes which play an important role in laying out the execution plan. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---