Subject | Re: Grave problems with a big table |
---|---|
Author | stefan_ziel |
Post date | 2002-02-27T11:57:23Z |
--- In ib-support@y..., Lele Gaifax <lele@s...> wrote:
I experimented a similar problem and the solution was an index.
Example:
create table big ( a integer, b integer, c integer, d date,
constaint big_pk primary key (a, b, c ) );
create index disturb on big ( a, d );
executing the statement
select * from big where a = 1 and b = 2 and c = 3
the optimizer used the index disturb and this took a lot of time.
droping the index the result was great - from 6s to 10ms - :-)
take a look at the PLAN
Stefan
> Hi all,to
>
> I'm hitting a problem with Firebird that I'm not able to solve nor
> understand its nature.one
>
> I have a moderately sized DB (~ 650Mb), that contains in particular
> big table with more than 1,200,000 (~ 300 Mb) records. Anyoperation on it
> takes forever to complete... Almost everything was tried, from gfix(that
> does not complain at all), to sweep/backup/restore, but none of themworking
> reached an and after a day! Operating on all other tables seems
> well...the new
>
> So, I tried to pump the big table into a clean db, but after that,
> DB becomes unusable as well (... as bad!)Hi Lele,
>
> Is there anything I can inspect to understand what is going on?
>
> thank you in advance,
> bye, lele.
I experimented a similar problem and the solution was an index.
Example:
create table big ( a integer, b integer, c integer, d date,
constaint big_pk primary key (a, b, c ) );
create index disturb on big ( a, d );
executing the statement
select * from big where a = 1 and b = 2 and c = 3
the optimizer used the index disturb and this took a lot of time.
droping the index the result was great - from 6s to 10ms - :-)
take a look at the PLAN
Stefan