MySQL Forums
Forum List  »  Optimizer & Parser

strange query performance
Posted by: Eugene G
Date: October 01, 2006 08:56AM

1. average time 1.3 s
SELECT  
sql_no_cache
ClientSeriousness.*
FROM Clients INNER JOIN ClientSeriousness ON Clients.SeriousnessID = ClientSeriousness.SeriousnessID
WHERE Clients.ProjectID=1390;

describe gives the following info

id,select_type,table,type,possible_keys,key,key_len,ref,rows,Extra
1,SIMPLE,ClientSeriousness,ALL,PRIMARY,NULL,NULL,NULL,4,
1,SIMPLE,Clients,ref,ProjectID,SeriousnessID,SeriousnessID,5,ClientSeriousness.SeriousnessID,5,Using where

2. average time 0.06 s
SELECT sql_no_cache count(*) from Clients where ProjectID = 1390

3. average time 0.03 s
SELECT sql_no_cache count(*) from ClientSeriousness

How could it be ?

Options: ReplyQuote


Subject
Views
Written By
Posted
strange query performance
2998
October 01, 2006 08:56AM
1974
October 01, 2006 11:56AM
1946
October 03, 2006 02:43AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.