p4 dbstat

Display size or simple statistics for one or more database tables.

Syntax conventions

p4 [g-opts] dbstat [-h][-f] {-a | dbtable ...}
p4 [g-opts] dbstat -s


The p4 dbstat command displays statistics on the internal state of the database on the Helix server. The dbtable corresponds to the db.* files in your server’s root directory. This command is typically used in conjunction with Perforce technical support to estimate disk seeks due to sequential database scans.

Using the -f with the -h options, a histogram of free page distribution is shown, but the distance report is omitted.

To obtain size information, use p4 dbstat -s.


Because p4 dbstat blocks write access to the database while it scans the tables, use this command with care. You will most often use this command when working with Perforce technical support.



Display statistics for all tables.


Displays a page count, free pages, and percent free data for the specified table(s).


Display a histogram showing distances between leaf pages.


Report file sizes of database tables.


Display statistics for the specified table (for instance, db.have, db.user, and so on.) As you are most likely to need data for a particular table when working with support, they will let you know the name of the table for which you need information.


See Global options.

Usage Notes

Can File Arguments Use Revision Specifier? Can File Arguments Use Revision Range? Minimal Access Level Required