Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can i speed this up ??
Message
From
06/07/2006 01:00:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
05/07/2006 23:58:49
Suhas Hegde
Dental Surgeon
Sirsi, India
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01134026
Message ID:
01134036
Views:
16
Both goto n) and scan next n should be quite fast. Which part of your code is too slow?

>hi,
>here is the code which i want to speed up....
>any ideas ?? or a different approach ??? VFP 6
>
>
>lparameter ncount
>local ncount
>
>if !used('foo')
>	CREATE CURSOR foo (f1 n(20,2),f2 i)
>else
>	select foo
>	zap
>endif
>
>FOR m.xi = this.highlow1.ymin TO this.highlow1.ymax STEP (ROUND((this.highlow1.ymin+this.highlow1.ymax)/2,0)*0.1)/100
>	INSERT INTO foo (f1) values(m.xi)
>NEXT
>SELECT foo
>INDEX ON f1 TAG f1
>
>
>SELECT (this.alias_name)
>GOTO ncount
>SCAN NEXT 80
>	m.high = high
>	m.low = low
>*	replace f2 WITH f2+1 FOR foo.f1 >= m.low and foo.f1 <= m.high IN foo
> 	replace f2 WITH f2+1 FOR BETWEEN(foo.f1,m.low,m.high) IN foo
>ENDSCAN
>
>how can use the index in the above ?
>
>
>suhashegde
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform