Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inefficient query
Message
From
26/01/2007 16:24:23
 
 
To
25/01/2007 09:45:05
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01188966
Message ID:
01189801
Views:
10
Thank you, Tamar.

I did a little investigaiton, using sys(3054,2). It strikes me that use of IIF() to test for empty filter criteria creates a roadblock to rushmore optimization.

version 1, as before, query unchanged
Using index tag Client_id to rushmore optimize table a
Rushmore optimization level for table a: partial
Rushmore optimization level for table b: none
Rushmore optimization level for table d: none
version 2 - removed the IIF() around the loan number selection criteria and changed it to use BETWEEN.

This, for the moment, assumes values will be in those variables.
AND (b.loan >= lcFromAccount); && changed lines
AND (b.loan <= lcToAccount);

Using index tag Client_id to rushmore optimize table a
Rushmore optimization level for table a: partial
Using index tag Loan to rushmore optimize table b     && see the change here.
Rushmore optimization level for table b: partial
Rushmore optimization level for table d: none
This appears to suggest I should somehow construct the query on the fly based on what criteria were filled in. If so, whats a good way to proceed?
Jim Newsom
IT Director, ICG Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform