If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Performace Check

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-13-06, 04:37
aruna_mathew aruna_mathew is offline
Registered User
 
Join Date: Sep 2006
Posts: 1
Performace Check

Hi All,

I am getting performance issue when i run the following query. Its taking 5 to 8 min to provide the data.

City table contains 45000 records.
State table contains 500 records
Country table contains 300 records

Now the Query as follows......

SELECT distinct
F.fileid as 'Fileid',
F.FileName as 'File Name',
D.Zip as 'Zip',
D.City as 'City',
D.State as 'State',
D.Country as 'Country',
D.AddressTypeID as 'AddressTypeID'
FROM
lap_file F ,lap_filedatarecord L, lap_datarecord_address D
WHERE F.fileid=L.fileid
AND L.filedatarecordid=D.filedatarecordid
AND F.batchid=20
AND D.addresstypeid=1
AND (d.zip NOT IN
(SELECT zip FROM lap_City lc where lc.cityname=d.city and lc.stateid
IN (select stateid from lap_state ls where ls.statecode=d.state)));


Please provide me the answer.

Thank You

Aruna Mathew
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On