Kbase P26305: WHOLE-INDEX used for 'WHERE NOT '
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  02/06/2003 |
|
Status: Unverified
SYMPTOM(s):
WHOLE-INDEX used for query 'WHERE NOT <logicalField>' instead of relevant index
Adding 'USE-INDEX' has no effect
'WHERE <logicalField> = NO' results in correct index being used
'WHERE <logicalField>' results in correct index being used
CAUSE:
The 'NOT' operator is a function or, in this case, an expression.
If a function is used on the LEFT side of a query WHERE clause, each record has to be read so the function can be evaluated.
FIX:
Only use expressions on the RIGHT side and not database fields.