Neoview Repository User Guide (R2.4 SP1)

Query Statistics
NOTE: As of Neoview Release 2.4 SP1, these three views should no longer be used to retrieve
query information:
ODBC_QUERY_STATS_V1
ODBC_QUERY_STATS_V2
QUERY_RUNTIME_STATS_V1
These views access current query statistics, so your pre-SP1 queries continue to work. However,
adjust your applications as soon as possible to use the QUERY_STATS_VW1 and SQL_TEXT_VW1
views.
CAUTION: Even though your pre-R2.4 SP1 queries will not fail due to these view changes,
some fields are no longer available in ODBC_QUERY_STATS_V1, ODBC_QUERY_STATS_V2,
and QUERY_RUNTIME_STATS_V1. These fields now return NULL values when you run queries
using these views. For details, see Table C-7 (page 119).
For a summary of R2.4 SP1 changes to Repository , see “Summary of Changes For Repository
2.4 SP1” (page 118)
The Repository defines eight views for retrieval of query information:
For query information as of R2.4 SP1 or later, use these views:
QUERY_STATS_VW1
SQL_TEXT_VW1
For query information as of R2.4 SP1 or later, you can still use these deprecated views. See
Appendix B (page 99).
ODBC_QUERY_STATS_V1
ODBC_QUERY_STATS_V2
QUERY_RUNTIME_STATS_V1
For R2.4 query data:
ODBC_QUERY_STATS_V1_2400
ODBC_QUERY_STATS_V2_2400
QUERY_RUNTIME_STATS_V1_2400
Information accessed by these views was obtained before Repository Release 2.4 SP1, is
static, and will not be updated.
VIEW NEO.HP_METRICS.QUERY_STATS_VW1
Repository collects compilation and execution query statistics.
This view provides access to all query information. The SQL text for the query is also included,
up to 254 characters. If the SQL text is longer than 254 characters, the
SQL_TEXT_OVERFLOW_INDICATOR field is set to 1 to indicate that only part of the SQL text fits
in this view, and the complete SQL text is placed in the SQL_TEXT_VW1 view. In this case,
QUERY_STATS_VW1 has the first 254 characters and SQL_TEXT_VW1 has the complete SQL
text.
Character columns use ISO88591 or UCS2 encoding, as appropriate to the Neoview platform
configuration. If the platform is UCS2 or SJIS, all character columns are created with CHARACTER
SET UCS2. If the platform is ISO88591, all CHAR columns are created with CHARACTER SET
ISO88591.
The Primary Key for QUERY_STATS_VW1 field definition is EXEC_START_UTC_TS and
QUERY_ID.
22 Repository Views