Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fox Slow ? with CDX
Message
From
12/08/2007 05:40:16
Suhas Hegde
Dental Surgeon
Sirsi, India
 
 
To
11/08/2007 17:09:24
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
Miscellaneous
Thread ID:
01247603
Message ID:
01247673
Views:
33
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform