Appreciate any help at all Thanks, Paul
-----Original Message----- From: Paul Chu [mailto:[EMAIL PROTECTED] Sent: Friday, June 18, 2004 10:16 AM To: [EMAIL PROTECTED] Subject: Fastest way to load a master table removing duplicates Hi all, I want to load a Master table millions of rows for other sources with a unique index on e.g. ssn social sec number. If inserted records have a duplicate SSN I don't want to insert those but put them in a duplicate table or flag them. . The primary key will be an auto-increment field. There will be other indexes such as zipcode.. What is the fastest way to load these rows and remove duplicates ? Assume I load the rows to be inserted into another table. 1. Check if the ssn already exists before inserting the row ? 2. Insert the row and ignore duplicate using insert into master ( .) select .. From loaddata I have lots of files with data that can be saved to load tables and then inserted into the master table. Regards, Paul -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]