Re: Adding index kills query
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
Subject
Views
Written By
Posted
2511
April 23, 2014 06:10PM
1120
April 23, 2014 06:14PM
1163
April 24, 2014 02:44AM
Re: Adding index kills query
1302
April 24, 2014 09:07AM
1112
April 25, 2014 07:39AM
1261
April 25, 2014 11:54AM
1153
April 25, 2014 02:25PM
1249
April 28, 2014 06:06AM
1039
April 24, 2014 09:37AM
1086
April 24, 2014 06:31PM
1371
April 24, 2014 07:10PM
1185
April 24, 2014 07:19PM
1357
April 25, 2014 10:55AM
1044
April 25, 2014 11:02PM
2001
April 27, 2014 07:53PM
1128
April 27, 2014 08:50PM
1118
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.