Consultor Eletrônico



Kbase P150295: Oracle DataServer wrong index hint caused by non-unique index
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   30/07/2009
Status: Unverified

SYMPTOM(s):

Oracle DataServer wrong index hint caused by non-unique index


When using the USE-INDEX clause, an improper index hint is inserted

When executing the following code, the index specified is not used
FOR EACH wydplom USE-INDEX naplombe NO-LOCK:
DISPLAY wydplom.
END.


DataServer log shows:

SELECT /*+ INDEX_ASC (t0 wydplom##dtzlom) */ progress_recid unique_id_0,
nr_rej, ealunr, dtwyd, u##plomba, plomba, plomba_, u##zn_kol, zn_kol,
dt_zal, opis, monitor, stan, wydplomnr, dtzlom, ch1, ch2, ch3, ch4, ch5,
int1, int2, int3, int4, int5, dec1, dec2, dec3, dt1, dt2, dt3,
progress_recid
FROM siec.wydplom t0
ORDER BY nr_rej, u##plomba, u##zn_kol, unique_id_0

FACT(s) (Environment):

The ORDER BY clause uses the fields indexed by the index specified in the USE-INDEX clause
The correct data is returned
All Supported Operating Systems
Progress 9.x
OpenEdge 10.x
Oracle DataServer

CHANGE:

Added new index. The rest were created together with the table.

CAUSE:

The indexes are non-unique. Both indexes have "INDEX-NUM 2" defined in the .df of the schema holder

FIX:

Make the indexes unique