Subject Re: [firebird-support] Performance stats
Author Helen Borrie
At 12:59 PM 10/09/2004 +0000, you wrote:

>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:

If this is a "wish list" it doesn't belong here.

If it's a support question, I'll try to help:

>1) Active connections and what IP address they originate from.

No, but network tools can collect this information.

>2) Current or last active SQL command for each connection.

No. Clients can do this, of course, via SQL monitoring and profiling.

>3) Execution time of above command.

same as above

>4) # of IOs done by last command.

Mere "I/O" counts wouldn't be meaningful, since row data, index data and
blob data are all stored on pages. Recently-used pages are in the page cache.

You can examine the fill distribution of pages using gstat.

>5) Total execution time for connection.

Don't understand what you want here.

>6) Total IOs done by connection.

Irrelevant, as above. You can get a count of rows affected by an I/U/D
statement back to the client via the XSQLDA structure.

>7) Total length of time connection active.

Network tools can log this.

>8) Current transaction #.

Not meaningful. There are typically many transactions "current" at
once. You can use the context variables CURRENT_CONNECTION and
CURRENT_TRANSACTION for the client to discover those IDs respectively.

Gstat will give you the ID of the Next Transaction.

>9) Length of time current transaction active.

Client only.

>This would be a big help while trying to find the cause of Firebird
>related performance problems.

If you want to pursue the idea, post to firebird-Architect. There is stuff
in the lock tables that (theoretically) could be transmogrified into
interesting peformance statistics.