Performace Check | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Performace Check

Hi, I have written the following query in MySQL, its taking lot of time to retrieve the values. Please provide me the solution. The Table "lap_City" Contains 50 thousand records, "lap_state" contains the 40 thousand records. SELECT Distinct
lap_file F ,
lap_filedatarecord L,
lap_datarecord_address D
WHERE F.fileid=L.fileid
AND L.filedatarecordid=D.filedatarecordid
AND F.batchid=66
AND D.addresstypeid=3
AND ( NOT IN(SELECT zip FROM lap_City lc where and lc.stateid
IN(select stateid from lap_state ls where ls.statecode=d.state)));
Thank You With Regards
Aruna Mathew
Sorry, but if you have really written this in MySQL’s SQL dialect, you should ask your question in a MySQL dedicated community, such as the MySQL mailing lists or
Frank Kalis
Microsoft SQL Server MVP