Subject Re: [ib-support] statistics
Author Claudio Valderrama C.
""Nick Upson"" <uebridger@...> wrote in message
news:F194eSOm3WsTiaqi66Y00004d62@......
> I understand that IB creates a plan for queries inside an SP or VIEW
> at the time it's created, if the data then changes considerably when
> does the plan get modified?

After you backup and restore, selectivity statistics are up to date and
indices are balanced (as much as they can be, depending on the data), then
the plans are calculated as Ann said. The engine doesn't update index
statistics automatically.
Of course, you could build procedures with hardcoded plans (I wouldn't do
that) and if you try with views, plans aren't stored in this case, a person
reported.

C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing