Subject Re: [firebird-support] Why "SELECT FIRST 1 ..." and "EXISTS ( SELECT * FROM ... )" are so slow in a big database?
Author Dmitry Yemanov
"Antti Nivala" <antti.nivala@...> wrote:
> I don't understand why poor selectivity would make
> the "FIRST 1" type of a query slow

Records are fetched from a table based on the bitmap filled by the index
scan. I.e. no record can be fetched until the index scan completes for all
existing matches. For a non-selective index, the scan may take quite a long