Subject Re: [firebird-support] Get last time a procedure is accessed.
Author Mark Rotteveel
On 2018-06-08 08:30, antoedincharley@... [firebird-support] wrote:
> Is there any way that we could log last accessed time of a procedure.
>
> I am in a process of cleaning up 8 years old database. DB is having
> more than 1000 procedures in which only 10-20% will be using now after
> optimizations and improvisations.
>
> If I could get the last accessed time of every procedure it would help
> me to clear the unused procedures from the DB. It is very difficult to
> make changes as there are lots of procedures in dependencies.
>
> In case there is no logging of procedure's accessed time, I would
> expect an option to start logging from now onwards, so after a
> monitoring of 6months to 1 year, I could clear those procedures.
>
> It is FB 2.5.7

There is nothing in Firebird itself that tracks this. You could use for
example the trace facility to track which statements are executed, but
that does have some overhead.

It might be simpler and quicker to search through your own code to check
which procedures are invoked or not.

Mark