Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sql not always rushmore'd
Message
From
15/04/2006 16:20:46
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01113886
Message ID:
01113893
Views:
33
>Hi Michael.
>
>Why should the field always be on the LHS.? Both queries produce exactly the same results.

It's just easier to create a parser that follows a simple rule like optimize by looking at the expression on the LHS.

It's right in the VFP help
A basic optimizable expression takes one of the two following forms:
              eIndex relOp eExp
-or-
              eExpr relOp eIndex
            
A basic optimizable expression has the following characteristics: 

eIndex exactly matches the expression on which an index is constructed.

eExpr is any expression and can include variables and fields from other unrelated tables.

relOp is one of the following relational operators: <, >, =, <=, >=, <>, #, ==, or !=. You can also use the ISNULL( ), BETWEEN( ), or INLIST( ) functions (or their SQL equivalents such as IS NULL, and so on).
In form one eIndex is optimized, not eExp. In form 2 eExpr is optimized, not eIndex. Been that way a long time.
Previous
Reply
Map
View

Click here to load this message in the networking platform