Subject Re: [firebird-support] Recompile triggers and SP
Author Martijn Tonies
Hey Ann,

>>> How can I recompile SP and triggers to update execution plan according
>>> new
>>> index selectivity. I need to make my application to do that.
>>
>> Execution plans aren't stored, they are generated "on the fly".
>>
>
> Err, actually no. Or yes. Or it depends. Execution plans for
> procedures aren't permanent unless they're explicitly defined by
> the creator of the procedure. On the other hand, once a procedure
> has been used by a server instance (meaning the server in SS and
> the connection in CS), its executable version is kept in memory.

So, "cached", not "stored".

Then yes, the advice is to log everyone out so the server unloads the
database.

With regards,

Martijn Tonies
Upscene Productions
http://www.upscene.com

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!

Database questions? Check the forum:
http://www.databasedevelopmentforum.com