# Method Sql.pgsql()->getstatistics()

Method getstatistics

  `final 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. Only available if PG_STATS is compile-time enabled.
  `"used_prepared_statements" : int` | Number of times prepared statements were used from cache instead of reparsing in the current session. Only available if PG_STATS is compile-time enabled.
  `"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_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. Only available if PG_STATS is compile-time enabled.
  `"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).
  `"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.