org.firebirdsql.management
Class FBStatisticsManager
- ServiceManager, StatisticsManager
public class FBStatisticsManager
The
FBStatisticsManager
class is responsible for replicating
the functionality of the
gstat
command-line tool.
This functionality includes:
- Retrieving data table statistics
- Retrieving the database header page
- Retrieving index statistics
- Retrieving database logging information
- Retrieving statistics for the data dictionary
FBStatisticsManager() - Create a new instance of
FBMaintenanceManager based on
the default GDSType.
|
FBStatisticsManager(String gdsType) - Create a new instance of
FBMaintenanceManager based on
a given GDSType.
|
FBStatisticsManager(org.firebirdsql.gds.impl.GDSType gdsType) - Create a new instance of
FBMaintenanceManager based on
a given GDSType.
|
attachServiceManager , createRequestBuffer , detachServiceManager , executeServicesOperation , getDatabase , getGds , getHost , getLogger , getPassword , getPort , getServiceName , getUser , queueService , setDatabase , setHost , setLogger , setPassword , setPort , setUser |
FBStatisticsManager
public FBStatisticsManager()
Create a new instance of FBMaintenanceManager
based on
the default GDSType.
FBStatisticsManager
public FBStatisticsManager(String gdsType)
Create a new instance of FBMaintenanceManager
based on
a given GDSType.
gdsType
- type must be PURE_JAVA, EMBEDDED, or NATIVE
FBStatisticsManager
public FBStatisticsManager(org.firebirdsql.gds.impl.GDSType gdsType)
Create a new instance of FBMaintenanceManager
based on
a given GDSType.
gdsType
- The GDS implementation type to use
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
gfix
on the command-line.
- getDatabaseStatistics in interface StatisticsManager
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
If this method is invoked with
0
as the
options
value, only the header and log statistics will
be output.
- getDatabaseStatistics in interface StatisticsManager
options
- A bitmask combination of
DATA_TABLE_STATISTICS
,
SYSTEM_TABLE_STATISTICS
, or
INDEX_STATISTICS
. Can also be 0
.
getHeaderPage
public void getHeaderPage()
throws SQLException
Fetch the database statistics header page. The header information is
written to this StatisticsManager
's logger.
- getHeaderPage in interface StatisticsManager
getTableStatistics
public void getTableStatistics(String[] tableName)
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.
- getTableStatistics in interface StatisticsManager
Copyright B) 2001 David Jencks and other authors. All rights reserved.