In my Rails app, I have a need to query a large dataset where it would be ideal to increase the prefetch_rows default for this statement only.
How can this be done using OracleEnhancedAdapter? I'm currently doing this:
conn = ActiveRecord::Base.connection
cursor = conn.execute(sql)
cursor.prefetch_rows = 1000
while row = cursor.fetch
#
end
But I am not sure this is working. Is there a better way?
Thanks.