Viewing Database Information
Prerequisites
A real-time profiling task has been created and is in progress.
Viewing JDBC Information
- In the Task/Report List area of the Java Profiler page, click the name of the analysis task under Real-Time Profiling.
The Overview tab page is displayed.
- Click the Database tab.
The page shown in Figure 1 is displayed.
- Select Display SQL/NoSQL statements and operations and click OK.
The JDBC page is displayed.
- Click Start Analysis to obtain the statistics report of hotspot statements.
The page shown in Figure 2 is displayed. For details about the parameters, see Table 1.
- The default threshold is 50 ms. Only those operations whose duration exceeds the threshold are analyzed. The threshold value ranges from 0 to 10000.
- You can select Also analyze database connection pool to obtain information about the database connection pool.
- You can click
on the page to save the snapshot of the current page to the Snapshot tab page. - You can click
or
to expand or collapse the content. - The GaussDB V2.0-8.100 Enterprise Edition is supported.
Table 1 Parameters on the JDBC tab page Parameter
Description
Hotspot Statement
SQL statements.
Total Time (ms)
Total time used for executing the statement.
Average Execution Time (ms)
Average execution time of the statement.
Execution Times
Number of times that the SQL statement is executed.
Real Time Monitoring
Executed Statements
Number of all SQL statements executed.
Average Execution Time
Average execution time of all SQL statements.
Viewing JDBC Connection Pool Information
- In the Task/Report List area of the Java Profiler page, click the name of the analysis task under Real-Time Profiling.
The Overview tab page is displayed.
- Choose .
The JDBC Connection Pool tab page is displayed.
- Click Start Monitoring.
The connection statistics report is generated, as shown in Figure 3. For details about the parameters, see Table 2.
- You can click
next to Link ID to set the number of level-2 links to be displayed. - You can click
in the upper right corner of the page to save the snapshot of the current page to the Snapshot tab page. - You can click View Details in the upper part of the page to view the tuning suggestions for the current task.
- You can click
or
to expand or collapse the content. - You can click
in the upper right corner of the page to view the configuration parameters of the JDBC connection pool. The configuration parameters that can be optimized are marked
and the tuning suggestions are displayed in pop-up messages. - The Stack Trace (Start Time) and Stack Trace (End Time) areas in the lower part of the page display stack calling information of the connection start time and end time. You can click
in the upper right corner of the page and choose Tool Settings > Java Profiler > System Settings to change the value of Stack Depth to re-define the stack depth in the Stack Trace area.
Table 2 Parameters on the JDBC Connection Pool tab page Parameter
Description
Link ID
Connection ID.
Connection String
Database address.
Start Time
Time when the connection started.
End Time
Time when the connection ended.
Event Count
Number of events executed during the connection.
Event Duration
Event duration.
Table 3 Druid connection pool parameters Parameter
Description
initialSize
Number of connections initialized in the connection pool when the program starts.
keepAlive
Indicates whether the keepAlive operation is performed.
maxActive
Maximum number of connections in the connection pool.
maxPoolPreparedStatementPerConnectionSize
Maximum number of SQL statements that can be cached for each connection.
maxWait
Maximum waiting duration to obtain a connection, in milliseconds.
minEvictableIdleTimeMillis
Minimum idle time of a connection in the connection pool, in milliseconds.
minIdle
Minimum number of idle connections in the connection pool.
poolPreparedStatements
Indicates whether SQL statements are cached.
testOnBorrow
Indicates whether the connection validity is checked when a connection is set up.
testOnReturn
Indicates whether the connection validity is checked when a connection is released.
testWhileIdle
Indicates whether the validity of existing connections is checked.
timeBetweenEvictionRunsMillis
Interval for checking idle connections in the connection pool, in milliseconds.
url
Connection address.
validationQuery
SQL statement used to check whether a connection is valid.
validationQueryTimeout
Timeout period for checking the connection validity, in seconds.
Table 4 c3p0 connection pool parameters Parameter
Description
acquireIncrement
Number of new connections to be created at a time when the connections in the connection pool are used up.
acquireRetryAttempts
Number of retry times when the connection pool fails to obtain connections from the database. If the value is less than or equal to 0, unlimited retries are allowed till the connection is obtained successfully.
acquireRetryDelay
Interval for the connection pool to obtain connections, in milliseconds.
autoCommitOnClose
Indicates whether a transaction is committed automatically when the connection pool reclaims a connection.
breakAfterAcquireFailure
Indicates whether the data source is automatically closed when a connection fails to be obtained.
checkoutTimeout
Waiting time for the application to obtain a connection when the connections in the connection pool are used up, in milliseconds. The value 0 indicates no limit.
forceIgnoreUnresolvedTransactions
Indicates whether a transaction is committed when the connection pool reclaims a connection.
idleConnectionTestPeriod
Interval for checking idle connections in the connection pool, in milliseconds.
initialPoolSize
Number of connections created when the connection pool is initialized.
jdbcUrl
Connection address.
maxConnectionAge
Maximum live time of a connection, in seconds. The value 0 indicates no limit.
maxIdleTime
Maximum idle time of a connection, in seconds. The value 0 indicates no limit.
maxIdleTimeExcessConnections
Maximum idle time of the connections that exceeds minPoolSize (minimum number of connections). The value 0 indicates no limit.
maxPoolSize
Maximum number of connections in the connection pool.
maxStatements
Maximum number of statements to be cached for all connections.
maxStatementsPerConnection
Maximum number of statements to be cached for a single connection.
minPoolSize
Minimum number of connections in the connection pool.
preferredTestQuery
SQL statement used to check whether a connection is valid.
testConnectionOnCheckin
Indicates whether the connection validity is checked when a connection is set up.
testConnectionOnCheckout
Indicates whether the connection validity is checked when a connection is released.
Table 5 DBCP connection pool parameters Parameter
Description
defaultAutoCommit
Indicates whether the automatic commit mechanism is used for new connections.
defaultQueryTimeout
Default query timeout period.
defaultReadOnly
Indicates whether the data source is read only.
defaultTransactionIsolation
Default transaction isolation status of a new connection.
initialSize
Number of connections initialized in the connection pool when the program starts.
logAbandoned
Indicates whether to print information when a connection is leaked.
maxConnLifetimeMillis
Maximum live time of a connection, in milliseconds. A value less than or equal to 0 indicates no limit.
maxIdle
Maximum number of idle connections in the connection pool. A value less than 0 indicates no limit.
maxOpenPreparedStatements
Maximum number of statements to be cached for all connections. A value less than 0 indicates no limit.
maxTotal
Maximum number of connections that can be requested by an application from the database connection pool. A value less than 0 indicates no limit.
maxWaitMillis
Maximum waiting duration to obtain a connection, in milliseconds. A value less than 0 indicates no limit.
minEvictableIdleTimeMillis
Maximum idle time of a connection, in milliseconds. The value 0 indicates no limit.
minIdle
Minimum number of idle connections in the connection pool.
numTestsPerEvictionRun
Number of connections to be checked each time when the idle connection reclaimer thread (if any) runs.
poolPreparedStatements
Indicates whether SQL statements are cached for connections.
removeAbandonedTimeout
Timeout interval before an abandoned connection is removed, in seconds.
rollbackOnReturn
Indicates whether the transaction is terminated when a connection is returned.
softMinEvictableIdleTimeMillis
Minimum idle time of the connection that exceeds minIdle (minimum number of idle connections). The value 0 indicates no limit.
timeBetweenEvictionRunsMillis
Interval for running the idle connection recycler thread.
Table 6 Hikari connection pool parameters Parameter
Description
autoCommit
Indicates whether the automatic commit mechanism is used for new connections.
connectionTestQuery
SQL statement used to check whether a connection is valid.
connectionTimeout
Maximum waiting duration to obtain a connection, in milliseconds.
driverClassName
Name of the driver class.
idleTimeout
Maximum idle time of a connection, in milliseconds.
initializationFailTimeout
Time for the connection pool to attempt to obtain the initial connection, in milliseconds. The value 0 indicates that the connection pool attempts to obtain and verify the connection. If the value is less than 0, no initial connection attempt is performed.
leakDetectionThreshold
Time when a connection can leave the connection pool without being recorded as a connection leak. The value 0 indicates that connection leakage detection is disabled.
maximumPoolSize
Maximum number of connections in the connection pool.
maxLifetime
Maximum live time of a connection, in milliseconds.
minimumIdle
Minimum number of idle connections in the connection pool.
poolName
Customized name of the connection pool.
readOnly
Indicates whether the connection obtained from the connection pool is read-only by default.
threadFactory
Sets the java.util.concurrent.ThreadFactory instance used to create all threads used by the connection pool.
transactionIsolation
Default transaction isolation level of the connection returned by the connection pool.
validationTimeout
Maximum time for testing whether a connection is alive, in milliseconds.
- You can click
- Select Real-time monitoring view from the Display drop-down list.The monitoring view is displayed. See Figure 4.
You can specify Alarm Threshold. Database connection durations that exceed the threshold are highlighted in red.
Viewing MongoDB Information
- In the Task/Report List area of the Java Profiler page, click the name of the analysis task under Real-Time Profiling.
The Overview tab page is displayed.
- Choose .
The MongoDB tab page is displayed.
- Click Start Analysis.
The hotspot operation statistics report is generated, as shown in Figure 5. For details about the parameters, see Table 7.
- The default threshold is 50 ms. Only those operations whose duration exceeds the threshold are analyzed. The threshold value ranges from 0 to 10000.
- You can click
in the upper right corner of the page to save the snapshot of the current page to the Snapshot tab page. - You can click
or
to expand or collapse the content.
Table 7 Parameters on the MongoDB tab page Parameter
Description
Hotspot Operation
Access operations to MongoDB.
Total Time (ms)
Total time used for executing the access operation.
Average Execution Time (ms)
Average execution time of the access operation.
Execution Times
Number of times that the access operation is executed.
Real Time Monitoring
Executed Statements
Number of access operations executed.
Average Execution Time
Average execution time of all the access operations.
Viewing Cassandra Information
- In the Task/Report List area of the Java Profiler page, click the name of the analysis task under Real-Time Profiling.
The Overview tab page is displayed.
- Choose .
The Cassandra tab page is displayed.
- Click Start Analysis.
The hotspot statement statistics report is generated, as shown in Figure 6. For details about the parameters, see Table 8.
- The default threshold is 50 ms. Only those operations whose duration exceeds the threshold are analyzed. The threshold value ranges from 0 to 10000.
- You can click
in the upper right corner of the page to save the snapshot of the current page to the Snapshot tab page. - You can click
or
to expand or collapse the content.
Table 8 Parameters on the Cassandra tab page Parameter
Description
Hotspot Statement
Access operation to Cassandra.
Total Time (ms)
Total time used for executing the access operation.
Average Execution Time (ms)
Average execution time of the access operation.
Execution Times
Number of times that the access operation is executed.
Real Time Monitoring
Executed Statements
Number of access operations executed.
Average Execution Time
Average execution time of all the access operations.
Viewing HBase Information
- In the Task/Report List area of the Java Profiler page, click the name of the analysis task under Real-Time Profiling.
The Overview tab page is displayed.
- Choose .
The HBase tab page is displayed.
- Click Start Analysis.
The hotspot operation statistics report is generated, as shown in Figure 7. For details about the parameters, see Table 9.
- The default threshold is 50 ms. Only those operations whose duration exceeds the threshold are analyzed. The threshold value ranges from 0 to 10000.
- You can click
in the upper right corner of the page to save the snapshot of the current page to the Snapshot tab page. - You can click
or
to expand or collapse the content.
Table 9 Parameters on the HBase tab page Parameter
Description
Hotspot Operation
Access operation to HBase.
Total Time (ms)
Total time used for executing the access operation.
Average Execution Time (ms)
Average execution time of the access operation.
Execution Times
Number of times that the access operation is executed.
Real Time Monitoring
Executed Statements
Number of access operations executed.
Average Execution Time
Average execution time of all the access operations.






