RE: How Much Data Can Be Written to a Database In One Instance?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> Subject: Re:  How Much Data Can Be Written to a Database In One	Instance?
> From: robert@xxxxxxxxxxxxx
> To: ajwei@xxxxxxxxxxxxx
> CC: php-general@xxxxxxxxxxxxx
> Date: Wed, 4 Mar 2009 15:26:38 -0500
> 
> On Wed, 2009-03-04 at 15:05 -0500, Alice Wei wrote:
> > Hi, 
> > 
> >   I am working on a series of long files that contain 4 or 5 MB each, each of them is encoded in UTF-8 saved as .dat format. 
> >   However, I have noticed that when I do insert statements, the file only reads up to around 1MB and then would stop. If I split the file into 3 or 4 files, that would hold no more than 1.2 MB each, then I won't have problems. 
> > 
> >   Is there a limitation on how much data can be read and written in PHP within one instance? 
> 
> See this setting in your php.ini:
> 
> memory_limit = ???M
> 
> Cheers,
> Rob.
> -- 
> http://www.interjinn.com
> Application and Templating Framework for PHP
> 

Weird, I had 

memory_limit = 128M      ; Maximum amount of memory a script may consume (128MB)

However, the file that I was trying to read from was 5MB of text file. I tried to read it line by line and also ran one query for each line along the way before I got it to the database. If I have a file that is around 1MB, I have no problems, but once it passes that, a lot of lines go missing. 

Alice

_________________________________________________________________
Express yourself with gadgets on Windows Live Spaces
http://discoverspaces.live.com?source=hmtag1&loc=us

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux