On Wed, Nov 4, 2009 at 11:00 AM, MB Software Solutions, LLC
<[email protected]> wrote:
> Did someone say awhile back that the use of the FoxPro BETWEEN function
> in an SQL query in code would NOT take advantage of Rushmore
> optimization?  I've seen some SQLs in our code that use BETWEEN(a,b,c)
> and it would be easy to change out to ANSI-SQL format (WHERE nArg
> BETWEEN nMin and nMax), but don't want to waste my time if it's a moot
> point.  There's an index on nArg.  I could add code to use the
> SYS(3054,x) but was hoping for someone's quick(er) answer.
--------------------------------------

>From the SQL Server engine perspective where foo Between 101 , 109 is
more efficient then
where foo in ( 101, 102, 103 ...109)  < the ... are proof that I am to
lazy to type #s>

Is this table joined in the query?  If so the index on column may
exist but probably not be consumed, so your Rushmore Q is No it will
not take advantage of Rushmore.  If the table will have more joins
those columns need to be identified in an index as well.

If your change your current index and have the key to include both the
column for the join as well as this data in question then Rushmore
will probably kick in.  All determined by the From clause, and then
the Where Clause of the SQL.

In my mind the term Rushmore kicking in = "table seek" instead of
"table scan" when you look at the execution plan the engine wants to
use.



-- 
Stephen Russell
Sr. Production Systems Programmer
SQL Server DBA
Web and Winform Development
Independent Contractor
Memphis TN

901.246-0159

_______________________________________________
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