Subject need help on optimization
Author russt4
Hello, I'm experiencing very slow performance on quite simple
queries. For example, a query like:
select count(*) from mytable
takes about five minutes on a 700MB database with 150k rows.
And a query like:
select distinct "id" from mytable
or:
select "id" from mytable group by "id"
also takes around five minutes, even though it says it is using
the index created on "id". It appears that firebird is
searching over every row in the table, and isn't just using
the information in the index to construct the result.

Obviously, I don't seem to understand how the firebird
optimizer works. Can anyone point me in the right direction?

Thanks, -Russ