Subject | Re: [Firebird-Java] Using Service API to retrieve database statistical info |
---|---|
Author | Roman Rokytskyy |
Post date | 2006-02-09T15:34:41Z |
Hi,
statManager.setHost(DB_SERVER_URL);
statManager.setUser(DB_USER);
statManager.setPassword(DB_PASSWORD);
statManager.setDatabase(getDatabasePath());
statManager.setLogger(loggingStream);
statManager.getDatabaseStatistics(
StatisticsManager.SYSTEM_TABLE_STATISTICS);
String statistics = loggingStream.toString();
request), but you can do the following:
statManager.getDatabaseStatistics(
StatisticsManager.SYSTEM_TABLE_STATISTICS | 0x20);
It should done the trick. And please fill feature request - we will add
separate constant in next release.
Roman
> First, is there any "step-by-step" example out there, showing thestatManager = new FBStatisticsManager();
> correct sequence on attaching, querying, adn detaching.
statManager.setHost(DB_SERVER_URL);
statManager.setUser(DB_USER);
statManager.setPassword(DB_PASSWORD);
statManager.setDatabase(getDatabasePath());
statManager.setLogger(loggingStream);
statManager.getDatabaseStatistics(
StatisticsManager.SYSTEM_TABLE_STATISTICS);
String statistics = loggingStream.toString();
> Second, how do I implement the functionality of "-r" option of gstat?Unfortunately there is currently no constant defined (please fill feature
> I mean, gstat's "-r" stands for "analyze average record and version
> length" (from gstat -h).
> In org.firebirdsql.management.FBStatisticsManager.java, the options
> are restricted to DATA_TABLE_STATISTICS and/or SYSTEM_TABLE_STATISTICS
> and/or INDEX_STATISTICS, and in org.firebirdsql.gds.ISCConstants.java
> doesn't exist the isc_spb_sts_record_versions constant (of value 0x20
> as stated in ibase.h, line 2367, from FireBird 1.5.2.4731).
request), but you can do the following:
statManager.getDatabaseStatistics(
StatisticsManager.SYSTEM_TABLE_STATISTICS | 0x20);
It should done the trick. And please fill feature request - we will add
separate constant in next release.
Roman