RE: [PHP] huge file to insert into postgres db
| From: | Mark Douglas | Date: | Tue, 22 Apr 2003 07:51:07 +0000 |
| Subject: | RE: [PHP] huge file to insert into postgres db | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-144786@lists.php.net to get a copy of this message | ||
If I understand correctly, your ASP page generates a PHP file that has 10000
mysql insert statements? Why not have the ASP file generate a delimited .txt
file that a php script could read in a while loop... this might save you
from crashing. Or do I have things all wrong?
-----Original Message-----
From: Matt MacLeod [mailto:matt@bigbarn.co.uk]
Sent: Tuesday, April 22, 2003 3:47 AM
To: php-general@lists.php.net
Subject: RE: [PHP] huge file to insert into postgres db
The CSV came originally from an Access db. I built an ASP page to pull
records into a script that I can copy from the browser into a text
editor and save as a .php file.
I've tried pulling various numbers of records at a time but 10000 is as
high as I can go without things crashing on me.
M
-----Original Message-----
From: Mark Douglas [mailto:Mark.Douglas@Q9.com]
Sent: 22 April 2003 08:40
To: 'Matt MacLeod'
What exactly is preventing you from doing more than 10000 records at a
time?
How are you shopping the file into "manageable bits" at present?
-----Original Message-----
From: Matt MacLeod [mailto:matt@bigbarn.co.uk]
I have a large CSV file containing UK postcodes with their n/e
co-ordinates which I need to put into a postgresql database. Its become
very hard to handle as my machine cannot handle the whole CSV file so
I've been chopping it into more manageable pieces and creating PHP
insert scripts with the 'chopped bits'.
Unfortunately, my PC can only handle about 10000 records at a time and
there are 2 million+. I don't have time to do 200 scripts, so does
anybody have any further ideas.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php