Subject Re: [IBO] Re: FW: IBO seems slower for some things compared with the BDE
Author Helen Borrie
At 11:12 AM 2/07/2003 -0600, you wrote:

>Daniel,
>Thanks for that. I originally tested this several months ago -- and when I
>returned to try to isolate this problem (since it was brought up), I was
>startled to find that it had disappeared. Unfortunately, my client is
>still using Firebird 1.0, but I have moved my developement system to 1.5
>for testing. My 3+ minute delay is now about 3-6 seconds. (Using a local
>server -- I don't expect the client's network system to be _quite_ as fast)
>Kudos to the Firebird team, that little change made a world of difference.
>
>Does anyone know -- can I add indexes to the sytem tables (i.e. Index
>RDB$INDEX_SEGMENTS on RDB$INDEX_NAME) in FB 1.0? (I _know_ that's screwing
>with system tables... and inherently dangerous), but the potential
>performance increase is incredible.

Rhett,
One big reason it's faster in 1.5 is that 1.5 has indexed the system tables.

And, no, there's no point in creating your own indexes in the system
tables, because they will disappear when you backup and restore the
database. You could workaround this (as many have done in the past) by
running a script after a restore, to add your custom indexes back into the
database. In 1.5, it's all done.

Adding custom system indexes isn't something to do trivially. It will
affect the plans used by the optimizer for updating metadata, which could
adversely impact activities like enabling and disabling indexes and
triggers. Also, if you apply your own indexes to the systables in a 1.5
database, there's a very strong chance that your indexes will step on the
system-created ones and result in the optimizer not using indexes at all.

Helen