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

> > The optimizer recalculates plan on every statement thus if content has
> > changed then the PLAN can change too. Note! That selectivity what
optimizer
> > uses to calculate cost is not updated after every insert/delete. That
means
> > 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
index
> > 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.

Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird links :
http://www.firebirdsql.com
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/


Nederlandse firebird nieuwsgroep :
news://80.126.130.81