Subject Re: Non-indexed reads on system tables
Author Alexander V.Nevsky
--- In ib-support@y..., "Rob Schuff" <rob@b...> wrote:
> Hi Folks,
>
> In using IBExpert, one can get a performance analysis of a stored
procedure
> execution. I have a SP that performs serveral selects and then
outputs the
> results as parameters. In l;ooking at the performance anaylsis
there
> several non-indexed reads on RDB$INDICES and
RDB$RELATION_CONSTRAINTS.
>
> I have searched the archives unsuccessfully to find out the full
story and
> what (if anything) one can/should do to remedy that issue.
>
> anyone know?
>

Hi, Rob.
1. If table is short enough, non-indexed access is more fast than
indexed. RDBMS developers usually orients themselves on "most common
case". If you have some system tables containing much more rows than
in this "MCC", you can add indexes that you hope should increase
performance and check it. Don't forget you have to recreate this
indexes after each database restore.
2. If I remember right, in IB6/Firebird was added some indexes on
system tables. What about tables you are interested, in my Firebird
there are

SHOW INDEX RDB$INDICES
RDB$INDEX_31 INDEX ON RDB$INDICES(RDB$RELATION_NAME)
RDB$INDEX_5 UNIQUE INDEX ON RDB$INDICES(RDB$INDEX_NAME)

SHOW INDEX RDB$RELATION_CONSTRAINTS
RDB$INDEX_12 UNIQUE INDEX ON
RDB$RELATION_CONSTRAINTS(RDB$CONSTRAINT_NAME)

Best regards.