SQL/MP Query Guide
Analyzing Query Performance
HP NonStop SQL/MP Query Guide—524488-003
6-71
EXPLAIN Plan for MAX Optimization
The plan contains the following information:
•
It consists of one step.
•
Access is by alternate index:
Access path 1 : Alternate \SQL1.$DATA8.PUBS.SAL, index only
•
The optimizer reads only one row from the table;
Executor aggr. : Derived from the 1st row returned by the scan
MAX ( SALARY )
Example 6-42. EXPLAIN Plan for MAX Optimization
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Query plan 1
SQL request : Select
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
---------------------------------------------------------------------------
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 1 out of 6 columns
Access path 1 : Alternate \SQL1.$DATA8.PUBS.SAL, index only
SBB for reads : Not used
Begin key pred. : None
End key pred. : None
Index selectivity : Expect to examine 26.7686% of rows from index
Index pred. : Will be evaluated by the disk process
( LAST_NAME > "JONES" ) AND ( FIRST_NAME <= ?P2 )
AND
( FIRST_NAME >= ?P1 )
Pred. selectivity : Expect to select 1.7544% of rows from index
Base table pred. : None
Executor pred. : None
Executor aggr. : Derived from the 1st row returned by the scan
MAX ( SALARY )
Table selectivity : Expect to select 1.7544% of rows from table
Expected row count: 4 rows after the scan
Operation cost : 1
Total cost : 1