Index scan question
Marc Brumlik
tsi-inc at comcast.net
Fri Jul 25 14:44:20 PDT 2008
Don Coleman wrote:
> List:
>
> After several tests I would like opinions on the following observations:
>
> Built an index on a YESNO field where for a *report export process where
> I only want to select 11 (YESNO) eq "" (blank)
Hi, Don
Your BEST solution (in my experience) is this:
You're looking for the field to be blank, and there's an index built on
it, so these records are at the beginning of the index. Assuming this
is index A, use the following command line:
*report file -f format -u -ia .....
This would run the report beginning with the records where 11="". At
the top of processing for this report, add one line:
IF 11="N"
THEN exit
This is extremely fast. No need for PFIXS or scanning at all. What you
will see when it runs is that *report immediately pops up with Records
Selected equal to the total size of the database, then it will count
down until it hits the first non-blank (N) record and exit immediately.
-- Marc
More information about the Filepro-list
mailing list