Subject RE: [firebird-support] Big database optimization
Author Leyne, Sean
Zoran,

> I am runing WI-V2.5.2.26539 Firebird 2.5, on win 7 64 bit. Databse is more
> than 20 GB big, and I have tables which are really huge - millions of rows.
>
> My query combines 6-7 tables, and all tables are searched with use of
> indexes, so altough tables are huge, query fethes only 10.000 rows, for
> example. So far so good. The issue I have is that if I run query firs time, it is
> very slow, even when using queries. Than , second time, cash is doing its, and
> query becomes fast.

It sounds like you are running in the problem of the initial query loading the table and index metadata into cache.

What query are you executing (SQL with PLAN sample please)?

What indexes do have defined?

What does your database header stats show?

What does you index stats shows for the indexes used by the query?


Sean