Simple PostgreSQL's COPY command support in ActiveRecord models
02-Jun-2022 1103
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 #Simple #PostgreSQL's #command #support #ActiveRecord #models #activerecord https://rubyonrails.ba/link/simple-postgresql-s-copy-command-support-in-activerecord-models