0

I have 4Gb xml-file & I need to export it to PostgreSQL. How to do this with Ruby language? Maybe you can show me some script examples?

Thank you!

Pavel
  • 189
  • 3
  • 11

1 Answers1

1

Going through your app would be a performance disaster with 4 GB file. (Though only a fraction of those 4 GB will remain once exported as CSV file).

Export the file from Excel to a CSV file and read that into PostgreSQL with COPY - this should also be the fastest way.

For a more detailed answer you would have to put more details into your question. There is a plethora of realted questions / answers here on SO. Try a search. This one has a lot of detail.

Community
  • 1
  • 1
Erwin Brandstetter
  • 605,456
  • 145
  • 1,078
  • 1,228