On May 16, 1:04 pm, "Mislav Marohnić" <[EMAIL PROTECTED]>
wrote:
> The former refers to your intention to drop prepared statements after each
> query. The latter is what would happen if you didn't cleanup these prepared
> statements - you'd suddenly have hundreds of them in the database. I think
> databases *would* blindly allow it to grow to unreasonable levels - can they
> do otherwise? Prepared statements were designed to be made manually; I don't
> think any of us can predict what happens when you have an insane number of
> them active, eg. would it be a hog, would it take up memory, etc.

I tested this with MySQL. I can't have unlimited number of prepared
statements. After a certain threshold, queries will fail.
My MySQLAdapter implementation caches up to 32 prepared statements
(this number can be changed). If the cache is full, the least recently
used one will be removed. Though, according to benchmarks, caching
prepared statements doesn't improve performance at all on MySQL.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to