Salesforce

How to stop the compiler from selecting inactive indexes?

« Go Back

Information

 
TitleHow to stop the compiler from selecting inactive indexes?
URL NameP818
Article Number000148915
EnvironmentProduct: Progress
Version: 8.1C, 8.2x, 9.x
Product: OpenEdge
Version: 10.x, 11.x
OS: All Supported Platforms
Question/Problem Description
How to stop the compiler from selecting inactive indexes?

How to prevent error 995 when the database contains inactive indexes?

The compiler will consider all indexes (active or inactive) during compilation.

If the compiler chooses an inactive index, and that index is still inactive when the program is run, then it will result with the error 995 during runtime
Index <index-name> is inactive and cannot be referenced. (995) 

If the compiler chooses an inactive index for a TEMP-TABLE, the code fails with compile error:
"Inactive <index> cannot be used for TEMP-TABLE <name>.  You must use USE-INDEX to specify the active indexes to use for the TEMP-TABLE, or use the startup option -noinactiveidx.  (3388)".

To force the compiler to ignore inactive indexes use the -noinactiveidx startup parameter. 
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
The client startup parameter -noinactiveidx was added in Progress 8.1C to prevent the compiler from selecting inactive indexes. 

Use the No Inactive Indexes startup parameter (-noinactiveidx) to exclude inactive indexes from the being evaluated at compile time for WHERE clauses and BY phrases as well as LIKE clauses in DEFINE TEMP-TABLE statements.

When a client session is started with this parameter, the compiler is forced to select only active indexes when compiling the source code.

This avoids the need to delete an inactive index from the database when trying to control which indexes are selected by the Compiler, unless USE-INDEX is used. For further discussion refer to Article  Different inactive index issues are caught in different ways.   
 
Workaround
Notes
References to Written Documentation

Startup Command and Parameter Reference
Keyword Phrase
Last Modified Date11/20/2020 7:10 AM

Powered by