Home » Performance » MySQL » Query tuning - Performance Issue
Query tuning - Performance Issue [message #2103] Fri, 19 October 2007 01:59
mudassirahammad  is currently offline mudassirahammad
Messages: 1
Registered: October 2007
Junior Member
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_PRICE 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




Previous Topic:Strange MySQL behavior
Next Topic:Storing InnoDB tables on RAM disk
Goto Forum:
  


Current Time: Thu Jul 9 21:33:45 EDT 2009

Total time taken to generate the page: 0.00974 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.