Consultor Eletrônico



Kbase P149707: How to avoid the ORDER BY clause for DataServer operations when using USE-INDEX?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   17/07/2009
Status: Unverified

GOAL:

How to avoid the ORDER BY clause for DataServer operations when using USE-INDEX?

GOAL:

How to improve performance removing the ORDER BY clause generated when the USE-INDEX is used?


GOAL:

Is it possible to use USE INDEX and not translate it to an ORDER BY for DataServer operations?


FACT(s) (Environment):

All Supported Operating Systems
DataServers

FIX:

ABL translates USE-INDEX to ORDER BY for DataServer operations. For example, if you define city-dept as an index on the city and department fields, the following ABL statements are equivalent when accessing a MS SQL/ORACLE database:

FOR EACH employee USE-INDEX city-dept
FOR EACH employee BY employee.city BY employee.department

In order to improve the performance, do not ask for a particular ordering of results with USE-INDEX or BY clauses, unless your application requires it. Allow the DataServer and Oracle to determine which index (if any)