Subject Re: [ib-support] Select count(*) slow even with index?
Author Aage Johansen
Georg Schäfer wrote:
> Helen wrote:
> > ... You would likely be better to remove that index and replace
> > it with one on (FOLDER_ID,PRI_KEY) to improve the selectivity.
>
> Of course, that would improve selectivity. But would it change the amount
> of work for the engine to do?
> ...


Improving the selectivity may be a great thing when you delete records (or
change the value of FOLDER_ID). Not having to search through long index
chains speeds things up considerably.


Regards,
Aage J.