SET PER_TABle_stats
Firebird 5.0
SET PER_TABle_stats [ON | OFF]
This command turns the display of per-table statistics on or off as desired.If no parameter is supplied to the command, it toggles the current state of the per-table statistics display.
When set to ON
, isql
shows per-table run-time statistics after query execution.It is set to OFF
by default.This command is independent of the [isql-set-stats] command.The name PER_TABLE_STATS
can be abbreviated up to PER_TAB
.Tables in the output are sorted by their relation id’s.
Example (width reduced from original output):
-- check current value SQL> SET; ... Print per-table stats: OFF ... -- turn per-table stats on SQL> SET PER_TABLE_STATS ON; SQL> SELECT COUNT(*) FROM RDB$RELATIONS JOIN RDB$RELATION_FIELDS USING (RDB$RELATION_NAME); COUNT ===================== 534 Per table statistics: --------------------+-------+-----+------+------+------+-------+-----+-------+ Table name |Natural|Index|Insert|Update|Delete|Backout|Purge|Expunge| --------------------+-------+-----+------+------+------+-------+-----+-------+ RDB$INDICES | | 3| | | | | | | RDB$RELATION_FIELDS | | 534| | | | | | | RDB$RELATIONS | 59| | | | | | | | RDB$SECURITY_CLASSES| | 3| | | | | | | --------------------+-------+-----+------+------+------+-------+-----+-------+
Note, some system tables are shown that were not listed in the query;the engine reads some additional metadata when preparing the query.
-- turn per-table stats off, using shortened name SQL> SET PER_TAB OFF;