MySQL Forums :: InnoDB :: Fast Insert Where Not Exist

Advanced Search

Fast Insert Where Not Exist
Posted by: Ferdie Palero ()
Date: December 01, 2016 07:58PM


Anyone can help on how this insert where not exist faster, currently the sql statement below working but it takes 1hour 42minutes for 65k records.

INSERT INTO exclusive (lname,fname,mname,address,city,state,zip)
SELECT lname,fname,mname,address,city,state,zip
FROM exclusive_temp a
WHERE NOT EXISTS (SELECT lname,fname,mname,address,city,state,zip
FROM exclusive b
where concat(a.lname,a.fname,a.mname,a.address,,a.state, = concat(b.lname,b.fname,b.mname,b.address,,b.state,
and b.deleted_date is null)
group by a.lname,a.fname,a.mname,a.address,,a.state,;

Thanks in Advanced.


Options: ReplyQuote

Subject Views Written By Posted
Fast Insert Where Not Exist 383 Ferdie Palero 12/01/2016 07:58PM
Re: Fast Insert Where Not Exist 248 Peter Brawley 12/01/2016 09:01PM
Re: Fast Insert Where Not Exist 229 Ferdie Palero 12/01/2016 11:00PM
Re: Fast Insert Where Not Exist 205 Peter Brawley 12/02/2016 12:08AM
Re: Fast Insert Where Not Exist 215 Ferdie Palero 12/02/2016 12:24AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.