Query tuning - Performance Issue

  • Filter
  • Time
  • Show
Clear All
new posts

  • Query tuning - Performance Issue

    Hi all,

    I am using the following query in my app and it is taking around 5-8 min to execute it,

    select inl.GODOWN_NAME,inl.PRODUCT_CODE,count(im.imei_no) ,inl.MODEL _NO,inl.RDS_PRICE from( select gd.GODOWN_NAME,p.PRODUCT_CODE,p.MODEL_NO,p.RDS_PRI CE from GODOWN gd ,product p where gd.RDS_CODE = '114954' )inl left outer join imei im on im.GODOWN_NAME = inl.GODOWN_NAME and im.RDS_CODE = '114954'and im.PRODUCT_CODE = inl.PRODUCT_CODE and AVAILABLE='Y' and CLASSIFICATION = 'Y' group by inl.GODOWN_NAME,inl.PRODUCT_CODE order by inl.GODOWN_NAME,inl.PRODUCT_CODE

    there are around
    5 lakh records in IMEI table
    300 records in PRODUCT table
    20 records in GODOWN table

    IMEI table is refering both GODOWN and PRODUCT table.
    I am using MYSQL4.1.

    please suggest on tuning this query.

    Thanks in advance