Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
!Empty select-SQL not rushmore optimized?
Message
From
14/07/1999 01:30:54
 
 
To
13/07/1999 15:14:42
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00240156
Message ID:
00241144
Views:
39
>Craig is right. Between and Inlist are optimizable without a specific index, except that an index must exist for the fields specified in the between and inlist functions. Empty() doesn't work that way.
>
>For example, between(field1,1,10) will optimize with an index on field1. Inlist(field1,1,2,3,4,5) will optimize with an index on field1. Empty(field1) will not optimize with an index on field1. However, an index on empty(field1) will allow optimization like an index on upper(field) will.

IMO, creating an index on EMPTY(field) is a waste. You can index on field, then get an optimized query on field = SPACE(LEN(Field)) for character field, or field = {} for date.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform