IBM PureData System for Analytics, Version 7.1

$hist_query_prolog_n

The $hist_query_prolog_n table contains the initial data that is collected at the start of a query.

A query with a plan, a query without a plan, and a plan without a query all result in the creation of a record with an operation ID (opid) in the $hist_operation_n table. The query prolog and epilog, plan prolog and epilog, table access, and column access for that query or plan all share the same operation ID. Consequently, this operation ID can be used as a key for joining all query-related data. The session-related data is retrieved by using the foreign key session ID (sessionid).

Table 1. $hist_query_prolog_n
Name Type Description
npsid integer NPS ID. This ID and the instance ID (npsinstanceid) and operation ID (opid) form the foreign key into the operation table.
npsinstanceid integer Instance ID of the source IBM® Netezza® system.
opid bigint Operation ID. This ID is used as a foreign key from query epilog, overflow and plan, table, column access tables to query prolog.
logentryid bigint This ID and the NPS ID (npsid) and instance ID (npsinstanceid) form:
  • A foreign key into the hist_log_entry_n table
  • A primary key for this table
sessionid bigint The Netezza session ID. This ID and the NPS ID (npsid) and instance ID (npsinstanceid) form the foreign key from query, plan, table, and column access tables into session tables.
parentopid bigint Operation ID of the parent stored procedure. For Release 4.6, this value is null.
userid bigint User ID used for execution of this query. For Release 4.6, this value is null.
username nvarchar(128) User name that is used for the execution of this query. For Release 4.6, this value is null.
submittime timestamp Submit time of the query.
checksum bigint The checksum of the entire query string, which can help to identify identical queries.
querytext nvarchar(8192) Up to the first 8 KB of the query text. Any remaining text in the query is stored in the $hist_query_overflow_n table.
dbid bigint The OID of the database connected to at the time of the query execution. For SET CATALOG and SET SCHEMA queries, it is the database connected to at the time when those commands ran.
dbname nvarchar(128) The name of the database to which the query is connected.
schemaid bigint The OID of the database connected to at the time of the query execution.
schemaname nvarchar(128) The name of the schema to which the query is connected.
tzoffset integer The timezone offset in minutes. This field is available only in database version 2 or later.
client_user_id nvarchar(1024) The user ID under which the application that submitted the query. This field is available only in database version 3 or later.
client_application_name nvarchar(1024) The name of the application that submitted the query associated with the plan. This value is specified for the session, and is usually set by an application. This field is available only in database version 3 or later.
client_workstation_name nvarchar(1024) The host name of the workstation on which the application that submitted the query associated with the plan runs. This value is specified for the session, and is usually set by an application. This field is available only in database version 3 or later.
client_accounting_string nvarchar(1024) The value of the accounting string. This value is specified for the session, and is usually set by an application. This field is available only in database version 3 or later.


Feedback | Copyright IBM Corporation 2014 | Last updated: 2014-02-28