Subject Re: [firebird-support] Re: Using PLAN string in a view
Author Thomas Steinmaurer
>> The constraint is a key (primary, foreign or unique), if you do not
>> specify it explicitly in the plan on the view definition there is no
>> dependency.
>> When you execute a query the engine you check the available indices and
>> use the best for the query, if you droped some constraint the index will
>> not be available, and so, not be used.
>> So, answering your question, you are right, you will have no dependency
>> problem.
> Hello and thanks for your reply.
> I've recreated all views without a custom PLAN statement now.

Good move.

The problem with custom PLANs is that the SQL statement execution
becomes dependent on the availability of certain indexes by its name and
forcing the optimizer to use a particular index might not be a good idea
if data volume and distribution changes over time.

With regards,
Thomas Steinmaurer