I have a database with more than 200,000 records in the core table. An update table of similar record count contains a proper subset of the core table columns.
I'm looking for a fast method of merging the values in the two tables such that : 1. core table columns are updated, and 2. non-existent core records are inserted from the update table. It is not necessary that records missing from the update table cause deletes in the core table. Case 1 above needs something like: update Core set B = (select UpdateTable.B from UpdateTable as U where U.A = Core.A) set C = (select UpdateTable.C from UpdateTable as U where U.A = Core.A) ... where exists (select U.A from UpdateTable as U where U.A = Core.A); The table schema include indexes on the A columns, but this operations takes more than 10 minutes (and still not finished) when using sqlite3 from the command line. This is too long for use with PHP and a web-browser since the server kills the process after 30 seconds. Can anyone help? Chris Peachment ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------