Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fox Slow ? with CDX
Message
De
12/08/2007 05:40:16
Suhas Hegde
Dental Surgeon
Sirsi, Inde
 
 
À
11/08/2007 17:09:24
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
01247603
Message ID:
01247673
Vues:
34
hi all,

I use the array to feed to a fll.

So i decided to use the CDX and use seek

That Is really as fast as building a IDX and running.
Avoided the use of SQL alto gether in the scan..endscan


COde
Select dist symbol from bhav_data into cursor dist1 nofilter
select date from bhav_data group by 1 order by 1 into cursor date_temp nofilter 
select Dist1
scan
   dimension aopen[1]
   arraycount = 0
   select date_temp
   scan
    if seek(dtos(date)+dist1.symbol,'bhav_data','pk')
     arraycount= arraycount+1
     dimension aopen[arraycount]
     aopen[arraycount] = bhav_data.open
    endif
   endscan

* feed the array adate

endscan

That is fast , but not really fast as rebuilding idx in code but I feel with a marginial difference in time (about .5x difference) and well faster that using SQL abiout 3x
Thanx all for putting me use the CDX

Suhashegde
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform