Understand the Usage Tracking Tables

The system stores usage tracking data in three database tables.

The usage tracking process creates these tables with table names that you specify through settings in the Systems Settings page.

  • Usage Tracking Logical Query Logging Table
  • Usage Tracking Physical Query Logging Table
  • Usage Tracking Initialization Block Table

See Set Usage Tracking Parameters.

Usage Tracking Logical Query Logging Table

The following table describes each column in the database table that tracks logical queries. Where appropriate, the data type such as variable character field (varchar and varchar2) and length is specified. As you review the descriptions in this table, you might assume that certain time-related columns can be added or subtracted to equal exact values. For example, you might assume that TOTAL_TIME_SEC is equal to END_TS minus START_TS. The columns don't provide such exact values because:
  • Various processes run in parallel and their speed depends on the load and on database performance. Server-based operations might be either light or intensive.
  • If all connections are full, then the query enters a queue and waits to be processed. The timing depends on the load and the configuration.

User, Session, and ID-related Columns

Column Description

ID

In the Logical Query table, this column indicates the unique row identifier. In the Physical Query table, this column is denoted by the name LOGICAL_QUERY_ID.

NODE_ID

Contains <hostname>:<component_name> where <component_name> can be overridden by the environment variable COMPONENT_NAME. For example, examplehost:obis1 (for a single instance). Default value of COMPONENT_NAME is obis1.

PRESENTATION_NAME

Indicates the name of the Catalog. Default is Null and data type is Varchar(128).

IMPERSONATOR_USER_NAME

Specifies the user name of the impersonated user. If the request isn't run as an impersonated user, then the value is None. Default is None and the data type is Varchar(128).

USER_NAME

Specifies the name of the user who submitted the query.

ECID Indicates the system-generated execution context ID. Data type is Varchar2(1024).
TENANT_ID Specifies the name of the tenant of the user who ran the initialization block. Data type is Varchar2(128).
SERVICE_NAME Specifies the name of the service. Data type is Varchar2(128).
SESSION_ID Indicates the ID of the session. Data type is Number(10).
HASH_ID Indicates the HASH value for the logical query. Data type is Varchar2(128).

Query Origin-related Columns

Column Description

QUERY_SRC_CD

The source of the request.

Note that the requestor can set QUERY_SRC_CD to any string value to identify itself.

Possible values include:
  • Report - If the source is an analysis or any export operation.
  • Drill - If the source is a change in dimension caused by drilling up or down.
  • ValuePrompt - If the source is the Value drop-down list in a filter dialog or a dashboard prompt.
  • VisualAnalyzer - If the source is a workbook to visualize data.
  • DisplayValueMap or MemberBrowserDisplayValues or MemberBrowserPath - If the source is a value related to the display of an analysis.
  • SOAP - If the source is a call from web services such as DataSetSvc.
  • Seed - If the source is an agent that seeds the cache of the analytics server.
  • Null - If the source is the Admininistration Tool physical table or column row count, or view data.

SAW_DASHBOARD

Indicates the path name of the dashboard. If the query wasn't submitted through a dashboard, then the value is NULL.

SAW_DASHBOARD_PG

Indicates the page name in the dashboard. If the request isn't a dashboard request, then the value is NULL. Default is Null and the data type is Varchar(150).

SAW_SRC_PATH

Specifies the path name in the Catalog for the analysis.

Query Details-related Columns

Column Description

ERROR_TEXT

Contains the error message from the back-end database. This column is applicable only if the SUCCESS_FLAG is set to a value other than 0 (zero). Multiple messages are concatenated and aren't parsed by the system. Default is Null and data type is Varchar(250).

QUERY_BLOB

Contains the entire logical SQL statement without any truncation. The QUERY_BLOB column is a character string of type Long.

QUERY_KEY

Contains an MD5 hash key generated by the system from the logical SQL statement. Default is Null and the data type is Varchar(128).

QUERY_TEXT

Indicates the SQL statement that was submitted for the query. The data type is Varchar(1024).

You can change the length of this column (using the ALTER TABLE command), but note that the text written into this column is always truncated to the size that is defined in the physical layer. The semantic model administrator mustn't set the length of this column to a value greater than the maximum query length that's supported by the back-end physical database. For example, Oracle Databases enable a maximum Varchar of 4000, but Oracle Databases truncate to 4000 bytes, not 4000 characters. If you use a multibyte character set, the actual maximum string size has a varying number of characters, depending on the character set and characters used.

REPOSITORY_NAME

Specifies the name of the semantic model that the query accesses.

SUBJECT_AREA_NAME

Contains the name of the business model being accessed.

SUCCESS_FLG

Indicates the completion status of the query, as defined in the following list:

  • 0 - The query completed successfully with no errors.
  • 1 - The query timed out.
  • 2 - The query failed because row limits were exceeded.
  • 3 - The query failed due to some other reason.

Execution Timing-related Columns

Column Description

COMPILE_TIME_SEC

Contains the time in seconds required to compile the query. The number for COMPILE_TIME_SEC is included in TOTAL_TIME_SEC.

END_DT

Indicates the date the logical query completed.

END_HOUR_MIN

Indicates the hour and minute the logical query completed.

END_TS

Indicates the date and time the logical query completed. The start and end timestamps also reflect any time that the query spent waiting for resources to become available. If the user submitting the query navigates away from the page before the query finishes, then the final fetch never happens and a timeout value of 3600 is recorded. However, if the user navigates back to the page before the timeout, then the fetch completes at that time, which is recorded as the end_ts time.

START_DT

Indicates the date that the logical query was submitted.

START_HOUR_MIN

Indicates the hour and minute that the logical query was submitted.

START_TS

Indicates the date and time that the logical query was submitted.

TOTAL_TIME_SEC

Indicates the time in seconds that the system spent working on the query while the client waited for responses to its analyses. TOTAL_TIME_SEC includes the time for COMPILE_TIME_SEC.

RESP_TIME_SEC Indicates the time taken for query response. Data type is Number(10).

Execution Details-related Columns

Column Description

CUM_DB_TIME_SEC

Contains the cumulative time of all queries sent to the database. Queries run in parallel, so the cumulative query time is equal to or greater than the total time connected to the database. For example, suppose a logical request spawns 4 physical SQL statements sent to the database, and the query time for 3 of the queries is 10 seconds, and for one query is 15 seconds, CUM_DB_TIME_SEC displays 45 seconds because the queries run in parallel.

CUM_NUM_DB_ROW

Contains the total number of rows returned by the back-end databases.

NUM_DB_QUERY

Indicates the number of queries that were submitted to the back-end databases to satisfy the logical query request. For successful queries (SuccessFlag = 0), this number is 1 or greater.

ROW_COUNT

Indicates the number of rows returned to the query client. When a large amount of data is returned from a query, this column isn't populated until the user displays all the data.

TOTAL_TEMP_KB Specifies the total KB received for a query. Data type is Number(10).

Cache-related Columns

Column Description

CACHE_IND_FLG

Holds Y to indicate a cache hit for the query; N to indicate a cache miss. Default is N.

NUM_CACHE_HITS

Indicates the number of times that the cache result returned for the query. NUM_CACHE_HITS is a 32-bit integer (or a 10-digit integer). Default is Null.

NUM_CACHE_INSERTED

Indicates the number of times that the query generated a cache entry. Default is Null. NUM_CACHE_INSERTED is a 32-bit integer (or a 10-digit integer).

Usage Tracking Physical Query Logging Table

The following table describes the database table that tracks physical queries. This database table records the physical SQL information for the logical queries stored in the logical query logging table. The physical query table has a foreign key relationship to the logical query table.

User, Session, and ID-related Columns

Column Description

ID

Specifies the unique row identifier.

LOGICAL_QUERY_ID

Refers to the logical query in the logical query logging table. Data type is Varchar2(50).

HASH_ID Indicates the HASH value for the logical query. Data type is Varchar2(128).
PHYSICAL_HASH_ID Indicates the HASH value for the physical query. Data type is Varchar2(128).

Query Details-related Columns

Column Description

QUERY_BLOB

Contains the entire physical SQL statement without any truncation. The QUERY_BLOB column is a character string of type long.

QUERY_TEXT

Contains the SQL statement submitted for the query. Data type is Varchar(1024).

Execution Timing-related Columns

Column Description

END_DT

Indicates the date the physical query completed.

END_HOUR_MIN

Indicates the hour and minute the physical query completed.

END_TS

Indicates the date and time the physical query completed. The start and end timestamps also reflect any time that the query spent waiting for resources to become available.

TIME_SEC

Indicates the physical query execution time.

START_DT

Indicates the date the physical query was submitted.

START_HOUR_MIN

Indicates the hour and minute the physical query was submitted.

START_TS

Indicates the date and time the physical query was submitted.

Execution Details-related Columns

Column Description

ROW_COUNT

Contains the number of rows returned to the query client.

Usage Tracking Initialization Block Table

The following table describes the database table that tracks information about the initialization blocks.

Note:

Currently the initialization block usage tracking tables include only session initialization blocks and don't include the semantic model initialization blocks.

User, Session, and ID-related Columns

Column Description
USER_NAME The name of the user who ran the initialization block. The data type is Varchar2(128).
TENANT_ID The name of the tenant of the user who ran the initialization block. The data type is Varchar2(128).
SERVICE_NAME The name of the service. The data type is Varchar2(128).
ECID The system-generated execution context ID. The data type is Varchar2(1024).
SESSION_ID The ID of the session. The data type is Number(10).

Query Details-related Columns

Column Description
REPOSITORY_NAME The name of the semantic model that the query accesses. The data type is Varchar2(128).
BLOCK_NAME The name of the initialization block that was run. The data type is Varchar2(128).

Execution Timing-related Columns

Column Description
START_TS The date and time that the initialization block started.
END_TS The date and time that the initialization block finished. The start and end timestamps also reflect the time that the query spent waiting for resources to become available.
DURATION The length of time it took to run the initialization block. The data type is Number(13,3).

Execution Details-related Columns

Column Description
NOTES Notes about the initialization block and its running. The data type is Varchar2(1024).