|
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]
|