Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there something faster than COUNT FOR?
Message
De
14/05/1998 11:46:32
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
14/05/1998 11:25:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00099443
Message ID:
00099452
Vues:
21
>I need a fast COUNT for my table. Is there something faster than COUNT FOR? My code is COUNT FOR empty(mydate)... :)
Robert,
Keeping an index for mydate would make it fast. To make it faster you could use a filtered index expression and just count by setting order to it. Also keep a tag on deleted() (index on deleted() tag dummy). But IMO using SQL for counting is far better because it wouldn't move the rec pointer unnecessarily (still keep an index on mydate).
select cnt(*) from mytable where mydate={} into array aMyCount
return iif(type("aMyCount")= "U",0,aMyCount[1])
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform