Consultor Eletrônico



Kbase P127882: SQL query performs poorly using the wrong index when the fields in the WHERE clause are part of an i
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/13/2008
Status: Unverified

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.1A

SYMPTOM(s):

SQL query performs poorly

All fields in the search condition of the SELECT query are part of an index

The database tables have been created via 4GL

Running same query using 4GL client performs as expected

Running UPDATE INDEX STATISTICS, UPDATE COLUMN STATISTICS and UPDATE STATISTICS on the table(s) which is (are) referenced in the SELECT query does not help.

CAUSE:

The SQL-92 optimizer uses the primary index which does not contain all the fields in the query's WHERE clause

FIX:

Use INDEX HINT using syntax found in Solution P117826 on the best index to perform this query.