org.firebirdsql.management

Interface StatisticsManager

All Superinterfaces:
ServiceManager
Known Implementing Classes:
FBStatisticsManager

public interface StatisticsManager
extends ServiceManager

A StatisticsManager is responsible for replicating the functionality of the gstat command-line tool. This functionality includes:
Author:
Gabriel Reid

Field Summary

static int
DATA_TABLE_STATISTICS
Request statistics on data tables.
static int
INDEX_STATISTICS
Request statistics on indexes.
static int
RECORD_VERSION_STATISTICS
Request statistics on record versions.
static int
SYSTEM_TABLE_STATISTICS
Request statistics on system tables.

Method Summary

void
getDatabaseStatistics()
Get the full database statistics information, excluding system table information.
void
getDatabaseStatistics(int options)
Get specific database statistics.
void
getHeaderPage()
Fetch the database statistics header page.
void
getTableStatistics(String[] tableNames)
Get the table statistics.

Methods inherited from interface org.firebirdsql.management.ServiceManager

getDatabase, getHost, getLogger, getPassword, getPort, getUser, setDatabase, setHost, setLogger, setPassword, setPort, setUser

Field Details

DATA_TABLE_STATISTICS

public static final int DATA_TABLE_STATISTICS
Request statistics on data tables.
Field Value:
1

INDEX_STATISTICS

public static final int INDEX_STATISTICS
Request statistics on indexes.
Field Value:
8

RECORD_VERSION_STATISTICS

public static final int RECORD_VERSION_STATISTICS
Request statistics on record versions.
Field Value:
32

SYSTEM_TABLE_STATISTICS

public static final int SYSTEM_TABLE_STATISTICS
Request statistics on system tables.
Field Value:
16

Method Details

getDatabaseStatistics

public void getDatabaseStatistics()
            throws SQLException
Get the full database statistics information, excluding system table information. The statistics information is written to this StatisticsManager's logger.

The listed data includes:

  • statistics header page
  • log statistics
  • index statistics
  • data table statistics

Invoking this method is equivalent to the default behaviour of gstat on the command-line.


getDatabaseStatistics

public void getDatabaseStatistics(int options)
            throws SQLException
Get specific database statistics. The statistics information is written to this StatisticsManager's logger. All invocations of this method will result in the header page and log data being output. The following options can be supplied as a bitmask:
  • DATA_TABLE_STATISTICS
  • SYSTEM_TABLE_STATISTICS
  • INDEX_STATISTICS
  • RECORD_VERSION_STATISTICS

If this method is invoked with 0 as the options value, only the header and log statistics will be output.


getHeaderPage

public void getHeaderPage()
            throws SQLException
Fetch the database statistics header page. The header information is written to this StatisticsManager's logger.

getTableStatistics

public void getTableStatistics(String[] tableNames)
            throws SQLException
Get the table statistics. The statistics information is written to this StatisticsManager's logger.

The listed data includes:

  • the primary pointer and index root page numbers
  • number of data pages and their average fill
  • fill distribution

Invoking this method is equivalent to the behaviour of gstat -t

on the command-line.
Parameters:
tableNames - array of table names to analyze.

Copyright B) 2001 David Jencks and other authors. All rights reserved.