Subject Re: [firebird-support] Question about PLANs
Author Arno Brinkman

> > The optimizer recalculates plan on every statement thus if content has
> > changed then the PLAN can change too. Note! That selectivity what
> > uses to calculate cost is not updated after every insert/delete. That
> > it could be that selectivity value is not accurate. Although the change
> > between 5 and 15 records is not big ;-). You can force recalculate of
> > with SET STATISTICS statement if needed.
> I need some confirmation on this: If the 'index selectivity' is not
> recalculated after insert/delete, does this mean that we have to
> manually issue 'set statistics' every now and then? Or is there any
> automatic recalcuation behind the screen?

There is an automatic recalculation, but don't ask me which values/changes
exactly triggers this recalculation. If you do a huge insert/delete then you
could eventually run SET STATISTICS to update statistics values directly.

Arno Brinkman

Firebird links :

Nederlandse firebird nieuwsgroep :