DB2 SQL文執行計劃監控是DB2數據庫監控的重要組成部分,下面就讓我們來了解一下什麼是DB2 SQL文執行計劃監控。
靜態的sql文執行計劃存放在系統的catalog表中,動態sql文的執行計劃存放在global package cache。
如果要使用explain工具,首先要創建相關的表,建表腳本在/misc/EXPLAIN.DDL,只要運行過一次explain GUI工具,將自動創建這些表。
explain特定注冊器類型:
CURRENT EXPLAIN MODE - Used to populate only the explain data. No snapshot will be taken.
CURRENT EXPLAIN SNAPSHOT - Used to capture only the explain snapshot data.
設置explain特定注冊器類型:
SET CURRENT EXPLAIN MODE option
SET CURRENT EXPLAIN SNAPSHOT option
The explain registers options are:
NO - No explain information is captured for dynamic SQL statements.
YES - Explain tables or snapshot information will be populated for dynamic SQL statements while executing the SQL statement, and the result is returned.
EXPLAIN - Explain tables or snapshot information will be populated for dynamic SQL statements without executing the SQL statement. Use this state to obtain explain information without executing the SQL statement.
DB2 SQL腳本批量執行的實現過程
DB2在線導出的方法
db2存儲過程常用語句
DB2 CREATE SERVER語句的用法
常用的DB2管理命令