ActiveRecord and Oracle bind variables

We decided to use Rails / Oracle for the new project. I understand that ActiveRecord does not support bind variables, and that these hamstrings are Oracle's ability to cache queries and lead to significant performance issues. It is said that using the cursor helps, but not completely, solve this problem.

If this description is accurate enough, what is the actual effect? Is it just a bad idea to use ActiveRecord with Oracle or is there a set of best practices that can reduce the impact on some possible acceptable level?

+4
source share
1 answer

It seems like some kind of support has been released for Oracle binding variables with Active Record. This Oracle tutorial describes the cursor exchange approach.

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

Whether you will have serious performance issues really depends on your application and the underlying hardware.

Sharing a cursor similar to similar should help improve performance over anything, but you really need to test your application with production data and production workload to see how your performance will be and whether it will be satisfactory.

+1
source

Source: https://habr.com/ru/post/1298936/


All Articles