Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Silly little grid question
Message
De
22/01/2005 13:48:01
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
00979303
Message ID:
00979640
Vues:
8
>>>Try to issue LOCATE after setting filter
SET FILTER TO ...
>>>LOCATE
>>
>>Is this supposed to be faster than GO TOP?
>
>It's a habbit from fox 2.6 days when LOCATE with FILTER was rushmore optimizable and GO TOP wasn't. I don't know if it still hold true for the latest VFP versions.

Yes.

Current situation:
* exists a index for the filter condition
GO TOP and LOCATE (FOR .T.) uses a ordered by TAGNO() scan
* exists a index TAGUSEDFOROPTIMIZATION for the filter condition
1 TAGNO()=0 ( TABLE order)
GO TOP use a ordered by TAGNO() scan
FOR condition uses a full optimized SEEK ( time is o(Log(RECCOUNT))
2 TAGNO()#TAGUSEDFOROPTIMIZATION
GO TOP use a ordered by TAGNO() scan
FOR condition uses a partial optimization ( time is o(RECCOUNT))
3 TAGNO()=TAGUSEDFOROPTIMIZATION
This is a important issue because
VFP don't see this as full optimizable !!!
GO TOP use a ordered by TAGNO() scan
FOR condition uses a partial optimization when it can uses a full optimization. Sin.
The workaroud is SET KEY.

Fabio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform