Skip to content

Commit

Permalink
Improve documentation of TableStatisticsManager
Browse files Browse the repository at this point in the history
  • Loading branch information
mrotteveel committed Nov 21, 2024
1 parent f29b148 commit 211a6f2
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/docs/asciidoc/chapters/services/services.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -885,10 +885,24 @@ Allowed values are:

[.since]_Jaybird 5_

A new class was added in Jaybird 5, `org.firebirdsql.management.FBTableStatisticsManager`, which can be used to retrieve the table statistics of a connection.
The class `org.firebirdsql.management.FBTableStatisticsManager` can be used to retrieve the table statistics of a connection.

Create an instance with `FBTableStatisticsManager#of(java.sql.Connection)` -- the connection must unwrap to a `FirebirdConnection` -- and retrieve a snapshot of the statistics with `FBTableStatisticsManager#getTableStatistics()`.

The method `getTableStatistics()` returns a `Map<String, TableStatistics>`, where the keys are table names, and the values statistics of tables.

A `TableStatistics` object has the following properties:

* `tableName`
* `readSeqCount`
* `readIdxCount`
* `insertCount`
* `updateCount`
* `deleteCount`
* `backoutCount`
* `purgeCount`
* `expungeCount`

[NOTE]
====
This is an experimental feature.
Expand Down

0 comments on commit 211a6f2

Please sign in to comment.