Subject RE: [Firebird-Architect] Firebird performance stats
Author Samofatov, Nickolay
Hi!

> Does there exist, or are there any plans to implement, a
> means of accumulating performance related stats for a
> Firebird database.
> Useful items would include, but not necessarily be limited to:
>
> 1) Active connections and what IP address they originate from.
> 2) Current or last active SQL command for each connection.
> 3) Execution time of above command.
> 4) # of IOs done by last command.
> 5) Total execution time for connection. That is to say the
> amount of CPU and/or wall clock time used by the connection
> for its lifetime.
> 6) Total IOs done by connection.
> 7) Total length of time connection active.
> 8) Current transaction #.
> 9) Length of time current transaction active.
>
> It might also be nice to be able to provide a history of the
> information for a particuluar time period to help identify trends.
>
> This would be a big help while trying to find the cause of
> Firebird related performance problems.

Some of this information you may get from existing statistics API calls
or using IBExpert wire protocol interceptor.

I'm working on API for performance monitoring and plugins which are
supposed to address all of the above issues and not only.
For example, you will be able to find out which indexes were not used
for searches during the past week.

Regarding IP address there is a complication. Performance API plugin
parses DPB and extracts informational items from there.
I think if I make REMOTE interface put remote IP address into DPB before
passing connect call down the chain I won't break architectural
layering.

Nickolay