Neoview Workload Management Services Guide (R2.5)

Figure 1-8 Query Statistics Aggregation Enabled for a Repetitive Query
VST021.vsd
Query prepare
Query execution
Begin message
Would like to execute
Aggregate
statistics
End message
Query execution
Query finished
WMS_INTERVAL expires
Update WMS
REPOS_INTERVAL expires
Update the Repository
Repository
Database
NDCS
Server
SQL Compiler
or Executor
WMS
Process
As Figure 1-8 illustrates, the NDCS server prepares the query once and executes it repeatedly.
However, instead of sending a “would like to execute” request for each execution of the query,
the NDCS server sends a single “would like to execute” request to WMS. Also, the NDCS server
sends a single begin/end message to the Repository because it aggregates the query statistics
during multiple executions of the query.
How Query Statistics Aggregation Works
Queries that are prepared once and executed repeatedly have the same query identifier (ID) for
each execution. If you do not enable query statistics aggregation, the NDCS server writes a record
to the Neoview Repository each time the query executes, regardless of whether the same query
ID is used.
If you enable query statistics aggregation, the NDCS server aggregates the statistics of the
repeating query ID into one record that it writes to the Repository at the end of the statistics
aggregation. This results in fewer rows in the Repository. These events trigger the end of one
cycle of statistics aggregation for a query:
When the configured Repository interval (REPOS_INTERVAL) expires
When the query is re-prepared and the query ID changes
At the close or drop of the statement containing the query
When the client disconnects from the Neoview platform
When the NDCS server is stopped
When an error occurs during query execution
When the query is cancelled
When an administrator changes any of the connection rules. (For more information, see
“Effect of Modifying a Connection Rule” (page 73).)
When the query's execution time exceeds the configured execution interval (EXEC_INTERVAL),
the NDCS server writes the query's statistics to the Repository without aggregating its statistics.
If the query continues executing after the configured Repository interval (REPOS_INTERVAL)
expires, the NDCS server starts aggregating the query statistics anew.
Query Statistics Aggregation 29