[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Trying to import 50,000 items
"I am trying to import a catalog of roughly 50,000 items and I am finding
the import from the admin ui too slow (timing out on webserver).
Database is PostgreSQL 7.1.3 and Interchange 4.8.3. Is there a command line
utility to allow this from a tab delineated file."
Try using vi to edit the file and modify it into a bunch of SQL statements.
First Replace each beginning of the line with something like:
insert into tablename (column1, column2, column3....) values '
:%g/^/s//INSERT INTO.../
Next replace each tab with a
','
:%g/^I/s//','/g
then replace each end of the line with a
');
:%g/$/s//');/
write the file..
then do this:
psql -e yourdatabasename < yourfilename
It should not take very long to import all the data. On a good server, you
can probably run several statements in a second. So 50,000 divided by
however fast your server runs the statements.
------
_/_/_/_/ _/_/_/_/ Fred Pope
_/ _/ _/ Satcom Resources
_/_/_/ _/_/_/_/ http://www.satcomresources.com
_/ _/ mailto:fred@satcomresources.com
_/ _/ (970)-748-3094