You are here: Re: [PHP] Memory Leak? « PHP « IT news, forums, messages
Re: [PHP] Memory Leak?

Posted by Jasper Bryant-Greene on 10/23/05 01:08

On Sat, 2005-10-22 at 16:36 -0500, Richard Lynch wrote:
> I've written a script to munge and import 108,000+ records.
[snip]
> http://l-i-e.com/feedbaby/memory_leak.htm

It looks fine to me, but you might like to try accumulating the records
say up to 100 at a time and then doing extended INSERTs (if your MySQL
version supports them) like this:

INSERT INTO tablename
(col1, col2)
VALUES
('value1', 'value2'),
('value3', 'value4'),
('value5', 'value6'),
('value7', 'value7')

.... and so on.

These are apparently much nicer for MySQL to process, which may result
in lower memory usage and faster operation.

--
Jasper Bryant-Greene
General Manager
Album Limited

e: jasper@album.co.nz
w: http://www.album.co.nz/
p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303
a: PO Box 579, Christchurch 8015, New Zealand

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация