MySQL Forums
Forum List  »  Performance

Re: Adding index kills query
Posted by: Robert Stafford
Date: April 24, 2014 09:07AM

Here are the explain results using indexes:

explain select iCompanyID, sum(fPurchaseAmt) FROM Trans_smp GROUP BY iCompanyID;

id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Trans_smp index NULL idxComp 9 NULL 15272017

And ignoring indexes:

explain
select iCompanyID, sum(fPurchaseAmt)
FROM Trans_smp
ignore index (idxCompBrand)
ignore index (idxComp)
ignore index (idxCompPurchAmt)
GROUP BY iCompanyID
;

id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Trans_smp ALL NULL NULL NULL NULL 15272017 Using temporary; Using filesort

Options: ReplyQuote


Subject
Views
Written By
Posted
2279
April 23, 2014 06:10PM
1017
April 23, 2014 06:14PM
1055
April 24, 2014 02:44AM
Re: Adding index kills query
1201
April 24, 2014 09:07AM
1008
April 25, 2014 07:39AM
1139
April 25, 2014 11:54AM
1061
April 25, 2014 02:25PM
1102
April 28, 2014 06:06AM
920
April 24, 2014 09:37AM
979
April 24, 2014 06:31PM
1262
April 24, 2014 07:10PM
1083
April 24, 2014 07:19PM
1223
April 25, 2014 10:55AM
941
April 25, 2014 11:02PM
1895
April 27, 2014 07:53PM
1019
April 27, 2014 08:50PM
1004
April 27, 2014 09:00PM


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.