Here's what I'd do:

1. Create a temporary table using the Memory engine (you may need to
increase the max heap size if there's a lot of data)
2. Create a prepared statement to insert into the temp table (insert a bunch
of rows at the same time to speed this step up)
3. begin transaction
4. INSERT INTO [live tables] SELECT [cols] FROM [temp tables] .... ON
DUPLICATE KEY .... 
5. commit

You should be able to run the import in under 1 minute. (maybe a couple of
seconds, depending on your hardware)

Cheers,
David

--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Database-Optimization-Normalization-tp3426978p3427024.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to