Subject Re: Very long prepare time
Author Alexander V.Nevsky <ded@hq.bereg.net>
--- In ib-support@yahoogroups.com, "Heiko Tappe" <tappe@t...> wrote:
> So as a summary: after connection is established the first time
> a select is prepared, FB1/IB6 needs several seconds (1.6 to 6.0 s)
> to return. And it's not a very complicated command:
>
> SELECT ID FROM SomeTable

Heiko, on prepare of the first statement metadata casheing is
performed. To speed up it on FB1/IB6 and databases with complex
structure you can create additional indices on system tables, I long
ago use

index IDX1 for RDB$INDICES RDB$FOREIGN_KEY;
index IDX2 for RDB$RELATION_CONSTRAINTS
RDB$RELATION_NAME, RDB$CONSTRAINT_TYPE;

Note this indices don't survive backup/restore, you should create them
manually each time you restore database. In FB1.5 they are real system
indices RDB$INDEX_42 and RDB$INDEX_43.

Best regards, Alexander V.Nevsky.