Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
Sql
Sql.pgsql

Method Sql.pgsql()->getstatistics()


Method getstatistics

mapping(string:mixed) getstatistics()

Returns

A set of statistics for the current session:

"warnings_dropped" : int

Number of warnings/notices generated by the database but not collected by the application by using error() after the statements that generated them.

"skipped_describe_count" : int

Number of times the driver skipped asking the database to describe the statement parameters because it was already cached.

"used_prepared_statements" : int

Numer of times prepared statements were used from cache instead of reparsing in the current session.

"current_prepared_statements" : int

Cache size of currently prepared statements.

"current_prepared_statement_hits" : int

Sum of the number hits on statements in the current statement cache.

"prepared_portal_count" : int

Total number of prepared portals generated.

"prepared_statement_count" : int

Total number of prepared statements generated.

"portals_opened_count" : int

Total number of portals opened, i.e. number of statements issued to the database.

"blocked_count" : int

Number of times the driver had to (briefly) wait for the database to send additional data.

"bytes_received" : int

Total number of bytes received from the database so far.

"messages_received" : int

Total number of messages received from the database (one SQL-statement requires multiple messages to be exchanged).

"bytes_sent" : int

Total number of bytes sent to the database so far.

"packets_sent" : int

Total number of packets sent to the database (one packet usually contains multiple messages).

"reconnect_count" : int

Number of times the connection to the database has been lost.

"portals_in_flight" : int

Currently still open portals, i.e. running statements.


Note

This function is PostgreSQL-specific, and thus it is not available through the generic SQL-interface.