ActiveRecord PostgreSQL Adapter extension for using a cursor to return a large result set

PostgreSQLCursor extends ActiveRecord to allow for efficient processing of queries returning a large number of rows, and allows you to sort your result set.In PostgreSQL, a cursor runs a query, from which you fetch a block of (say 1000) rows, process them, and continue fetching until the result set is exhausted. By fetching a smaller chunk of data, this reduces the amount of memory your application uses and prevents the potential crash of running out of memory.Supports Rails/ActiveRecord v3.1 (v3.2 recommended) higher (including v5.0) and Ruby 1.9 and higher. Not all features work in ActiveRecord v3.1. Support for this gem will only be for officially supported versions of ActiveRecord and Ruby.
ActiveRecord PostgreSQL Adapter extension for using a cursor to return a large result set #ruby #rubydeveloper #rubyonrails #activerecord https://rubyonrails.ba/single/activerecord-postgresql-adapter-extension-for-using-a-cursor-to-return-a-large-result-set

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles