Method: OCI8::Cursor#prefetch_rows=

Defined in:
lib/oci8/cursor.rb

#prefetch_rows=(rows) ⇒ Object

Set the number of rows to be prefetched. This can reduce the number of network round trips when fetching many rows. The default value is one.

FYI: Rails oracle adaptor uses 100 by default.

Parameters:

  • rows (Integer)

    The number of rows to be prefetched



391
392
393
394
# File 'lib/oci8/cursor.rb', line 391

def prefetch_rows=(rows)
  attr_set_ub4(11, rows) # OCI_ATTR_PREFETCH_ROWS(11)
  @prefetch_rows = rows
end