Inserting large file into mysql

From: Eurisko (not_at_home.out)
Date: 03/26/05


Date: Sat, 26 Mar 2005 08:29:19 GMT

Hi

I have a 65 Meg CSV file I need to insert into mysql. I can't use the import functions of mysql because there needs to be a little processing of the data first.

I read the file into an array with file() then go araind the array with a foreach. However I keep getting a segmentation fault after about 17000 lines.

Im using unset to clear all variables and mysql_free_result() to clear some mysql memory.

Can anyone help?

Thanks



Relevant Pages

  • Re: Advice about fetching user information
    ... but actually *selecting* them in MySQL ... PHP scripts and use a gaugefunction to time pretty much every ... The same is pretty much true for searching an array in PHP - ... But I wouldn't be searching. ...
    (comp.lang.php)
  • Re: Inserting large file into mysql
    ... Eurisko wrote: ... > I have a 65 Meg CSV file I need to insert into mysql. ... > I read the file into an array with filethen go araind the array ...
    (alt.php)
  • Re: Using DBI, better option than importing into @array
    ... MySQL, though, so I'm having fun with the challenges along the way. ... importing the subjects table into an array in the beginning of the ... is not a good measurement. ... That's extremely helpful, Peter. ...
    (comp.lang.perl.misc)
  • Re: [PHP] Add New Records Only!
    ... I do understand getting data from both the existing DBF and the multiple ... mySQL tables into a temporary mySQL table. ... Then, in the receiving code, have an array of SQL connections. ... Save a copy of your primary key for each next ...
    (php.general)
  • Re: Using DBI, better option than importing into @array
    ... MySQL, though, so I'm having fun with the challenges along the way. ... importing the subjects table into an array in the beginning of the ... and you'll probably guess wrong and spend a lot of time improving ... my @filenames; ...
    (comp.lang.perl.misc)