wholeindex

WHOLE-INDEX found in xref on table [tablename]

Rule "wholeindex" scans the XREF file and gives this warning when it finds "WHOLE-INDEX".

This happens when you did not specify a WHERE-clause in your query, or a WHERE-clause with fields that
did not make it possible for Progress to set good index brackets.

The result can be that all records in [tablename] must be fetched and evaluated to check the WHERE-criteria. This is
bad for performance if there are many records in the table.

WHOLE-INDEX is not always slow. In the following example, Progress will report WHOLE-INDEX on the "FIND NEXT"
statement only because there is no WHERE-clause specified:

FIND customer WHERE customer.cust-num = 5 NO-LOCK NO-ERROR.
IF AVAILABLE customer THEN
   FIND NEXT customer NO-LOCK NO-ERROR.

In this particular example the FIND NEXT statement will perform pretty good despite the WHOLE-INDEX warning.


By the way, Prolint will also raise warning "no WHERE-clause used on customer" in this example (see rule nowhere).

Performance indicator:

  • on "wholeindex" and "nowhere", performance may not be so bad (but you should rewrite the statement anyway)
  • on "wholeindex" without "nowhere", performance is probably bad
  • on "sortaccess" and "nowhere", performance is probably horrible
  • on "sortaccess" plus "wholeindex" without "nowhere" performance is a potential nightmare.

the risc:

Possibly slow

how to solve this:

How to suppress these warnings:

Put directive {&_proparse_ prolint-nowarn(wholeindex)} in the source just before the line that causes the warning.

You might also use file "nowarn.lst" in directory prolint/settings or one of its subdirectories.
See also: suppress warnings.