Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is the best index expression?
Message
 
À
19/04/2005 12:23:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01005870
Message ID:
01006262
Vues:
15
Hi Thomas,

You're right. My suggestion was to use a SEEK / SCAN WHILE, but it look s like I have missed tying the SEEK command. This is what I meant in my code sample:
CASE m.lnTriggerType = TriggerTypeCode
   m.lcSearch = PADR(m.lcSearch, FSIZE("searchTB"))
   IF SEEK(m.lcSearch)
      SCAN WHILE !m.plError AND SearchTB == m.lcSearch FOR NOT EMPTY(CommandField)
         ...
      ENDSCAN
   ENDIF
...
Thanks for the correction.

You are also correct that SCAN WHILE is not Rushomre optimizable. However, the reason is that SCAN WHILE does not need to be optimized, since it is iterating through a contiguous set of records. Using optimization (in Rushmore terms) does not make sense in this case.

Sorin


>Hi Nadya,
>
>I only skimmed this thread, but
>
>CASE m.lnTriggerType = TriggerTypeCode
>   m.lcSearch = PADR(m.lcSearch, FSIZE("searchTB"))
>   SCAN WHILE !m.plError AND SearchTB == m.lcSearch FOR NOT EMPTY(CommandField)
>      ...
>   ENDSCAN
>...
>
I'ld be hesitant to use this since "while" in scan implies Scope REST (where is the go top ?) and I'ld guess it would also eliminate rushmore (the docs are a bit ambiguos from AFAIR). I tend to use "while" only in seek() scan-scenarios. In the code above Rushmore is certainly disabled for SearchTB == m.lcSearch and I don't see a if seek() ?
>
>regards
>
>thomas
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform