Simple PostgreSQL's COPY command support in ActiveRecord models

This Gem will enable your AR models to use the PostgreSQL COPY command to import/export data in CSV format. If you need to tranfer data between a PostgreSQL database and CSV files, the PostgreSQL native CSV parser will give you a greater performance than using the ruby CSV INSERT commands. I have not found time to make accurate benchmarks, but in the use scenario where I have developed the gem I have had a four-fold performance gain. This gem was written having the Rails framework in mind, I think it could work only with active-record, but I will assume in this README that you are using Rails.
Simple PostgreSQL's COPY command support in ActiveRecord models #ruby #rubydeveloper #rubyonrails #activerecord https://rubyonrails.ba/single/simple-postgresql-s-copy-command-support-in-activerecord-models

Nezir Zahirovic

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

related articles