Hi Michael

> Got this line of code that looks up data in a local view:
>
>    LOCATE FOR cRecType = tcRecType AND iKey = tiKey AND nJobID =
>    this.nJobID
>
>
> I've got separate indexes (temporary ones since it's a local view!) on
> cRecType, iKey, and nJobID
>
> My understanding is that Rushmore will notice these indexes and use
> them.  Would it be better to create a compound index and simply do a
> SEEK instead?  I'm gonna try that now but thought I'd get some Fox
> discussion going here.  <g>

I wrote an article about this exact scenario long ago.
http://advisor.com/doc/01468

Rushmore will have to examine and use 3 index tags and build 3 bitmaps
and - if my suspicions are right - a 4th to AND the first 3 to do
that.

SEEK will use a single index tag and will not build a bitmap. SEEK
does a much simpler and faster process than LOCATE, and since it's in
a view (with 600+ records?!>!) it will be fast. You may find another
speed boost because you only have to build 1 index, not 3.

Under 50 records, depending on the CPU, there is little difference
between the two commands.

The THIS.nJobID is different. Check speed of using a memvar against a
property. There's a difference, especially if you add access and
assigns to that property. Nothing you do with indexes will speed up
using the property. I NEVER use property references in any rushmore
commands.

Mike Yearwood


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to