views:

97

answers:

1

We have decided to use Rails/Oracle for a new project. My understanding is that ActiveRecord does not support bind variables and that this hamstrings Oracle's ability to cache queries and leads to significant performance problems. Cursor sharing has been said to help, but not completely, solve this problem.

If this description is reasonably accurate, what is the actual impact? Is it simply a bad idea to use ActiveRecord with Oracle or is there a set of best practices that can reduce the impact to some possibly acceptible level?

+1  A: 

It doesn't appear that any support had been released for bind variables on Oracle with Active Record. This Oracle tutorial describes the cursor sharing approach.

http://www.oracle.com/technology/pub/articles/mearelli-optimizing-oracle-rails.html

Whether you will have significant performance problems really depends on your application and underlying hardware.

Cursor sharing set to similar should help improve performance a good deal versus nothing, but you will really have to test your application with production data and production load to see how your performance will be and whether it will be satisfactory.

Dougman