Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Will this expression use Rushmore?
Message
 
 
À
28/01/2003 13:18:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00746321
Message ID:
00746375
Vues:
19
You've to use macro substitution to make it rushmore optimizable.
lcFieldName = lcalias + '.' + lcForeignKeyName
locate for &lcFieldName = uPrimaryKeyValueToLookUp
>I have a data access class with the following line of code:
>
>locate for eval(lcalias + '.' + lcForeignKeyName) = uPrimaryKeyValueToLookUp
>
>lcAlias is 'p1', lcForeignkeyName is 'stock_id'
>there is an index on stock_id (alone)
>
>There are 14K rows in the table. Sometimes this locate executes in an instant, and other times takes 7 or 8 seconds. I don't understand why it won't always use Rushmore/find the record immediately, and I have yet to determine what is different in the case where it doesn't execute in an instant.
>
>Does the eval() play any role/hinder Rushmore ?
>
>TIA
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform