'SO' |
Select Optimization |
The 'SO' parameter is used to control whether select optimization is enabled. Select optimization is applicable only for selects on Keyed or EFF PxPlus data files.
If select optimization is applicable but is disabled, then the key used in reads done for the select will be the primary key unless a specific key was specified via KNO=. In addition, no key range will be used to limit the number of reads unless a key range was specified via BEGIN and/or END.
If select optimization is applicable and enabled but the key and/or key range is not clearly specified, then PxPlus will look for a WHERE expression that can be used to select the key and key range that will minimize the number of reads. If PxPlus does not find a WHERE expression or it finds a WHERE expression that it cannot optimize, then the primary key will be used with no key range. A WHERE expression can be used for optimization if it meets the following requirements:
(The 'SO' system parameter was added in PxPlus 2018.)
Off – Select optimization for non-join selects is Off.
SELECT Select/Query From ... Where