Re: Parsing large file
| From: | John Holmes | Date: | Wed, 01 Sep 2004 12:32:19 +0000 |
| Subject: | Re: Parsing large file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-195383@lists.php.net to get a copy of this message | ||
From: "Adrian Teasdale" <adrian@europeantenders.com>
We have a text file that is 2.2gb in size that we are trying to parse using PHP to put the content into a mysql database. This file contains 40 million individual lines of data. Basically PHP isn't parsing it. Any suggestions of how we could do this?Don't read the entire file into memory, just a line at a time, for example. Use set_time_limit() to ensure you have enough time to complete everything. ---John Holmes...