Link to home
Start Free TrialLog in
Avatar of pointeman
pointemanFlag for United States of America

asked on

MySQL Query Takes Too Long.

This query runs quickly in MSSQL, however extremely slow in MySQL. Help!

INSERT INTO Archives (DateIn, `Priority`
(SELECT DateIn, `Priority`
 FROM Logs s
 JOIN Ports p on p.Port = s.Port And p.Secured = '1'
 Where Not Exists (Select DateIn From Users Where DateIn = s.DateIn))

 -- or --

Where DateIn Not In (Select DateIn From Users))
ASKER CERTIFIED SOLUTION
Avatar of mrh14852
mrh14852

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pointeman

ASKER

Created index on both tables for Join purposes, thx