Populating a database

psql.png
I am populating a database. Three tables, two with more than 2500000 records, and the other with more than that. I have three text files with a record by line, with tabs delimiting fields. Two of the tables have a primary key (integer field) and the other a compound primary key (two integers). The first two tables have two fields, the last has three fields. I am using PostgreSQL, and using the \copy table from 'file' command. Unfortunately this is taking an eternity.

I tried to import them without defining the key, and it was a lot faster, but PGadmin III don't let me create the key after the import.

So, is there any other, faster, way to import these three tables?

Categories

1 Comments

Alberto said:

Finished for this time. I'll need to do this more times. Suggestions still welcome.

Leave a comment

About this Entry

This page contains a single entry by null published on October 7, 2005 5:23 PM.

Talking about ordering... was the previous entry in this blog.

FireFox 1.5 beta 2 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.