Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to tell when a filter results in 0 records
Message
De
23/08/2004 06:51:46
 
 
À
23/08/2004 06:16:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00935481
Message ID:
00935491
Vues:
28
hi Tore,

Probably,

Just did a test both with data on a local system and data residing on a server
Table 450,000 records
index active

loop of 1 to 1000,000
set Talk Off (On slows down locate)

And you know what ? Locate turns out to be the slower (about twice the time of go top)

See also http://fox.wikis.com/wc.dll?Wiki~VFPBasicDataConcepts~VFP There's a statement from Mike Yearwood

quote
GO TOP

to accomplish the same thing. Some people say that's a bit slower than a naked LOCATE. With all but the biggest tables, the speed difference is not detectable by humans.
unquote

Although I have never done any tests on huge tables, I have no doubts about locate being faster.

For smaller tables I have my doubts. I've never seen a penalty using go top
___________________________________
>Hi Gregory,
>
>with a big table and the correct index, the difference can be enormous. GO TOP can take minutes, LOCATE takes a few microseconds.
>
>>>>>Hi
>>>>>
>>>>>Is there any way to tell if a filter results in 0 records?
>>>>>
>>>>>Thanks
>>>>>
>>>>>Colin
>>>>
>>>>Something like
>>>>
>>>>&& after filter
>>>>go top in AliasName
>>>>
>>>>ZeroRecords = eof('AliasName')
>>>>
>>>
>>>I think 'locate' would be better as it's Rushmore optimizable.
>>>Cetin
>>
>>Yeah, perhaps. I've never done any test, so I don't know how much of a difference there's involved
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform