Subject Re: [firebird-support] Re: Primary key names change from FB1.0 to FB1.5
Author Paul Schmidt
On Mon, 2003-08-11 at 09:17, sboydlns wrote:
> After reading all of these replies, where to begin?
>
> First of all to those who claim that one should never use a PLAN
> clause. My experience has shown that in many instances the use of a
> PLAN clause can make a significant difference to the performance of
> certain queries. I certainly don't use PLAN clauses on every query
> but when I use them I NEED THEM. Besides, I got the original idea for
> using PLAN clauses from this support list.

You have to remember that just because you needed a plan clause in one
version of the engine, doesn't mean that current and future versions of
the engine will also need them. This isn't just a Firebird thing, every
database engine is undergoing the same process of refining the internal
optimizer so that the need for plan clauses is needed less and less.
Don't forget ANY time that you use any D.D.L. statement you need to
re-evaluate your plan clauses, because the engine might select a
different and better plan.

> As for using FB1.5 specific features like naming the indices in the
> constraint clause that still causes me a problem because my app has to
> continue to work for customers that are running older versions of
> Interbase so this is not an option. And before you suggest it, some
> of them can't upgrade because they are running an OS that Firebird no
> longer supports, like SCO and AIX.

You need to be careful with those, there are two solutions one, is to
check the engine version, and execute different SQL for different
versions of the engine. For example if the engine is V1.5 then run some
SQL that names the indexes to the names they would have had under FB 1.0
or you could simply run your PLAN statements if the engine is <= 1.0 and
if the engine is 1.5 or above then you don't run the plan statements.

If this is done at startup time, it might be possible to simply have two
versions of the SQL, one for FB1.0 and a different one for FB1.5.














>
> Any other suggestions are appreciated.
>
>
>
>
>
> To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>