19.06.2013 Views

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

D.1.3 DSN_FUNCTION_TABLE<br />

You can use <strong>DB2</strong> EXPLAIN to obtain in<strong>for</strong>mation about how <strong>DB2</strong> resolves functions. <strong>DB2</strong><br />

stores the in<strong>for</strong>mation in a table called DSN_FUNCTION_TABLE. <strong>DB2</strong> inserts a row in<br />

DSN_FUNCTION_TABLE <strong>for</strong> each function that is referenced in an SQL statement when one<br />

of the following events occurs:<br />

► You execute the SQL EXPLAIN statement on an SQL statement that contains<br />

user-defined function invocations<br />

► You run a program whose plan is bound with EXPLAIN(YES), and the program executes<br />

an SQL statement that contains user-defined function invocations<br />

Be<strong>for</strong>e you use EXPLAIN to obtain in<strong>for</strong>mation about function resolution, you need to create<br />

the DSN_FUNCTION_TABLE. The contents are listed in Table D-4.<br />

Table D-4 DSN_FUNCTION_TABLE extensions<br />

Column Type Content<br />

QUERYNO INTEGER A number that identifies the statement<br />

being explained.<br />

QBLOCKNO INTEGER A number that identifies each query<br />

block within a query.<br />

APPLNAME VARCHAR (128) The name of the application plan <strong>for</strong><br />

the row.<br />

PROGNAME VARCHAR (128) The name of the program or package<br />

containing the statement being<br />

explained.<br />

COLLID CHAR (8) The collection ID <strong>for</strong> the package.<br />

GROUP_MEMBER CHAR (8) The member name of the <strong>DB2</strong> that<br />

executed EXPLAIN, or blank.<br />

EXPLAIN_TIME TMESTAMP Timestamp when the EXPLAIN<br />

statement was executed.<br />

SCHEMA_NAME VARCHAR(128) NOT NULL WITH<br />

DEFAULT<br />

FUNCTION_NAME VARCHAR(128) NOT NULL WITH<br />

DEFAULT<br />

SPEC_FUNC_NAME VARCHAR(128) NOT NULL WITH<br />

DEFAULT<br />

416 <strong>DB2</strong> <strong>UDB</strong> <strong>for</strong> z/<strong>OS</strong> <strong>Version</strong> 8 Per<strong>for</strong>mance <strong>Topics</strong><br />

Schema name of the function that is<br />

invoked in the explained statement.<br />

Name of the function that is invoked in<br />

the explained statement.<br />

Specific name of the function that is<br />

invoked in the explained statement.<br />

FUNCTION_TYPE CHAR(2) NOT NULL WITH DEFAULT The type of function that is invoked in<br />

the explained statement. Possible<br />

values are: SU - Scalar function, TU -<br />

Table function<br />

VIEW_CREATOR VARCHAR(128) NOT NULL WITH<br />

DEFAULT<br />

The creator of the view, if the function<br />

that is specified in the<br />

FUNCTION_NAME column is<br />

referenced in a view definition.<br />

Otherwise, this field is blank.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!