(taoewang@db2debug) /home/taoewang/temp$ db2expln -d sample -g -f "test.sql" -terminal -z ";"DB2 Universal Database Version 9.7, 5622-044 (c) Copyright IBM Corp. 1991, 2008Licensed Material - Program Property of IBMIBM DB2 Universal Database SQL and ...
显示全部(taoewang@db2debug) /home/taoewang/temp
$ db2expln -d sample -g -f "test.sql" -terminal -z ";"
DB2 Universal Database Version 9.7, 5622-044 (c) Copyright IBM Corp. 1991, 2008
Licensed Material - Program Property of IBM
IBM DB2 Universal Database SQL and XQUERY Explain Tool
DB2 Universal Database Version 9.7, 5622-044 (c) Copyright IBM Corp. 1991, 2008
Licensed Material - Program Property of IBM
IBM DB2 Universal Database SQL and XQUERY Explain Tool
******************** DYNAMIC ***************************************
==================== STATEMENT ==========================================
Isolation Level = Cursor Stability
Blocking = Block Unambiguous Cursors
Query Optimization Class = 5
Partition Parallel = No
Intra-Partition Parallel = No
SQL Path = "SYSIBM", "SYSFUN", "SYSPROC", "SYSIBMADM",
"TAOEWANG"
Statement:
select *
from employee
Section Code Page = 1208
Estimated Cost = 11.374599
Estimated Cardinality = 25.000000
Access Table Name = TAOEWANG.EMPLOYEE ID = 2,6
| #Columns = 14
| Skip Inserted Rows
| Avoid Locking Committed Data
| Currently Committed for Cursor Stability
| May participate in Scan Sharing structures
| Scan may start anywhere and wrap, for completion
| Fast scan, for purposes of scan sharing management
| Scan can be throttled in scan sharing management
| Relation Scan
| | Prefetch: Eligible
| Lock Intents
| | Table: Intent Share
| | Row : Next Key Share
| Sargable Predicate(s)
| | Return Data to Application
| | | #Columns = 14
Return Data Completion
End of section
Optimizer Plan:
Rows
Operator
(ID)
Cost
25
n/a
RETURN
( 1)
11.3746
|
25
n/a
TBSCAN
( 2)
11.3746
|
25
n/a
Table:
TAOEWANG
EMPLOYEE
(taoewang@db2debug) /home/taoewang/temp
$ db2level
DB21085I Instance "taoewang" uses "64" bits and DB2 code release "SQL09071"
with level identifier "08020107".
Informational tokens are "DB2 v9.7.0.1", "s091114", "IP23027", and Fix Pack
"1".
Product is installed at "/home/taoewang/sqllib".
(taoewang@db2debug) /home/taoewang/temp
$ cat test.sql
select
*
from
employee
;
(taoewang@db2debug) /home/taoewang/temp
$
next time please make sure to paste all information and screenshot for such problem, so that people can try your steps for repro.
In infocenter note the following statement:
-stmtfile query-statement-file
A file that contains one or more query statements to be dynamically prepared and explained. By default, each line of the file is assumed to be a distinct query statement.
If statements must span lines, use the -terminator option to specify the character that marks the end of an query statement. 收起