SQL/MP Query Guide

Analyzing Query Performance
HP NonStop SQL/MP Query Guide524488-003
6-41
TRIM and CHAR_LENGTH
The plan consists of one step with one operation. The CHAR_LENGTH and TRIM
functions appear in the base table predicate evaluated by the disk process. The total
cost is 2.
Example 6-25. EXPLAIN Plan for TRIM and CHAR_LENGTH
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
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 2 out of 6 columns
Access path 1 : Primary
SBB for reads : Virtual
Begin key pred. : None
End key pred. : None
Index selectivity : Expect to examine 100% of rows from table
Index pred. : None
Base table pred. : Will be evaluated by the disk process
CHAR_LENGTH ( TRIM ( BOTH " " FROM LAST_NAME ) )
> 5
Pred. selectivity : Expect to select 33.33% of rows from table
Executor pred. : None
Table selectivity : Expect to select 33.33% of rows from table
Expected row count: 19 rows after the scan
Operation cost : 2
Total cost : 2