Subject Re: Basic tests shows very poor performance
Author Svein Erling Tysvær
I think you forgot one thing, Pavel: His indexes have lousy
selectivity (i.e. not only out of date). The test contains only two
records duplicated 150000 times and indexing Boolean fields is not a
good idea in Firebird.

Though I'd say the test only proves that careless use of Firebird can
bring the server to its knees (admittedly, I am surprised that 150000
duplicates may make the server chew for an hour). It reminds me more
of testing how fast a space shuttle takes to move the first 100
meters, than resembles sensible test.

Set

--- In firebird-support@yahoogroups.com, Pavel Cisar wrote:
> Hi,
>
> 1) Select count(*) can't use index, it does full table scan. What
> performance other than pure I/O measure do you expect? Use some
> filter clause. But take the 3) into account!
>
> 2) You have deleted all data, so your table s full of garbage that
> have to be purged by GC. Your next table-scan query does that. Run
> this same query immediately again and it should be fast as hell.
> But if you do a filtered query, take the 3) into account!
>
> 3) You have changed (inserted) a lot of data. Your index statistics
> are way out of date, not to mention index structure efficiency. Use
> ALTER INDEX ... INACTIVE & ACTIVE to rebuild indices and recompute
> statistics. It should make a difference.
>
> best regards
> Pavel Cisar
> IBPhoenix