I have a data set where I have a field that contains file type. I’m trying to get the count of each one of these file types from a set of data. Below is the example query I’m running against a data set containing 286k entries.
select FILE_TYPE,count(FILE_TYPE) from database group by FILE_TYPE
This is taking about 17s to complete, and I’ve tried various indexes but they don’t seem to impact the performance and they don’t trigger in the explain plan. Any help on how I could improve this would be appreciated.