Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimization with Between
Message
From
14/02/2007 12:49:04
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Optimization with Between
Miscellaneous
Thread ID:
01195675
Message ID:
01195675
Views:
56
With index tags on Mem_dEffect and Mem_dExpire this is fully optimized:
SELECT * FROM MEMBER WHERE MEMER.Mem_dEffect<=m.ldDate AND MEMBER.Mem_dExpire>=m.ldDate
It would seem either of these two would be fully optimized.
SELECT * FROM MEMBER WHERE m.ldDate BETWEEN MEMBER.Mem_dEffect AND MEMBER.Mem_dExpire

SELECT * FROM MEMBER WHERE BETWEEW(m.ldDate, MEMBER.Mem_dEffect,MEMBER.Mem_dExpire) 
But with these optimization is only partial. Couldn’t you make the engine smart enough to figure this out and fully optimize it?

Also
SELECT * FROM MEMBER WHERE MEMBER.Mem_dExpire = {} 
is fully optimized
but
SELECT * FROM MEMBER WHERE EMPTY(MEMBER.Mem_dExpire) 
is not.
Again, couldn’t you make the engine smart enough to figure this out and fully optimize it?


Thanks,
Next
Reply
Map
View

Click here to load this message in the networking platform