Hongli Lai wrote: > On May 16, 5:49 am, "Michael A. Schoen" <[EMAIL PROTECTED]> wrote: > >>I'd have to disagree with you there. Rails actually performs very well >>with Oracle. A change made a while back to default to "similar" >>cursor_sharing resulted in much of the benefit of bind variables. >>"performs badly" is definitely too strong. > > > I have no experience with Oracle, but according to some blogs, such as > this one: > http://uncommentedbytes.blogspot.com/2006/07/major-enterprise-ruby-on-rails-issues.html > Rails performs badly because of the lack of use of prepared > statements. Here is a quote from Greg Luck: > "We have two production applications running on Ruby. And how is it. > Well, despite being perhaps no more than 5% of the functionality of > our applications, Ruby on Rails is the number one consumer of Oracle > CPU and logical gets. Why? Rails does not support prepared statements, > so Oracle has to reparse every time."
This was before Rails 1.2 which introduced the cursor_sharing=similar session parameter. It's oracle-specific and makes the database rewrite the queries on the fly to use bind variables instead of literal values. Btw even before 1.2 you may had used that parameter (only database-wide instead of on a single application). In any case using real bind variable would represent a further optimization step, as it'd allow a fine tuning of which bind variables vs literal values use in each query. Luca -- Web: http://spazidigitali.com - http://thetyper.com Email mailto://[EMAIL PROTECTED] Skype callto://l.mearelli -- --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
