Very simple statement:
select distinct locid from location
The table contains a million of rows, and the statement only return 1-3 records (i.e. the table only have 1-3 sets of locid). Index (locid) is built in the table, it takes 3-7 seconds to run this SQL, very slow, I have tried to build clustering index on locid, it helps a little, but still very slow, take 2-5 seconds to run. Is there any way to improve the performance of this SQL?
Thx in advance.