Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inefficient query
Message
De
26/01/2007 16:24:23
 
 
À
25/01/2007 09:45:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01188966
Message ID:
01189801
Vues:
11
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform