SQL/MP Query Guide

Analyzing Query Performance
HP NonStop SQL/MP Query Guide524488-003
6-77
EXPLAIN Plan for UPDATE
EXPLAIN Plan for UPDATE
This example shows the EXPLAIN plan for an UPDATE operation. The query updates
the EMPLOYEE table as follows:
EXPLAIN
UPDATE employee SET deptnum = 5
WHERE empnum = ?parm3;
The total cost of the query is 1.
Example 6-47. EXPLAIN Plan for Unique UPDATE
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Query plan 1
SQL request : Update
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
---------------------------------------------------------------------------
Plan step 1
---------------------------------------------------------------------------
Operation 1.0 : Scan
Table : \SQL1.$DATA8.PERSNL.EMPLOYEE
with correlation name EMPLOYEE
Access type : Record locks, stable access
Lock mode : Chosen by the system
Column processing : Requires retrieval of 0 out of 6 columns
Access path 1 : Primary, unique
SBB for reads : Not used
Begin key pred. : EMPNUM = ?PARM3
End key pred. : EMPNUM = ?PARM3
Index selectivity : Expect to examine 1.7544% of rows from table
Index pred. : None
Base table pred. : None
Type of Update : Unique
SBB for Update : Not used
Executor pred. : None
Table selectivity : Expect to select 1.7544% of rows from table
Expected row count: 1 row after the scan
Operation cost : 1
Total cost : 1