Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Incredible performance degration behaviour
Message
From
13/01/2005 14:18:07
Walter Meester
HoogkarspelNetherlands
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
00976753
Message ID:
00976889
Views:
24
Hi Howard,

I guess you missed the point. The point is that if you are :

1. changing the workarea
2. Trying to locate a or change a record in another workarea than the selected one

There is a tremendous decrease of performance when having lots of tables open.

Walter,



>Try this instead:
>
>CLEAR ALL
>CLEAR
>SET TALK OFF
>SET NULL ON
>
>
>?
>? "2 tables"
>? "---------"
>FOR nT = 51 TO 52
> SELECT 0
> CREATE CURSOR ("Res"+ALLTRIM(STR(nT))) (C C(1))
> APPEND BLANK
>ENDFOR
>DO TestPerf
>
>?
>? "10 tables"
>? "---------"
>CLEAR ALL
>FOR nT = 50 TO 60
> SELECT 0
> CREATE CURSOR ("Res"+ALLTRIM(STR(nT))) (C C(1))
> APPEND BLANK
>ENDFOR
>DO TestPerf
>
>?
>? "60 tables"
>? "---------"
>
>CLEAR ALL
>FOR nT = 1 TO 60
> SELECT 0
> CREATE CURSOR ("Res"+ALLTRIM(STR(nT))) (C C(1))
> APPEND BLANK
>ENDFOR
>DO TestPerf
>
>?
>? "100 tables"
>? "---------"
>
>CLEAR ALL
>FOR nT = 1 TO 100
> SELECT 0
> CREATE CURSOR ("Res"+ALLTRIM(STR(nT))) (C C(1))
> APPEND BLANK
>ENDFOR
>DO TestPerf
>
>
>FUNCTION TestPerf
>
>nSec= SECONDS()
>
>FOR nT = 1 TO 100000
> SELECT Res51
> SELECT Res51
>ENDFOR
>
>? "No workarea change", SECONDS() - nSec
>
>nSec= SECONDS()
>
>FOR nT = 1 TO 100000
> SELECT Res51
> SELECT Res52
>ENDFOR
>
>? "200.000 workarea changes", SECONDS() - nSec
>
>nSec= SECONDS()
>
>SELECT Res51
>FOR nT = 1 TO 100000
> REPLACE Res51.C WITH "X"
>ENDFOR
>
>? "100.000 replacements in current workarea", SECONDS() - nSec
>
>nSec= SECONDS()
>
>SELECT Res51
>FOR nT = 1 TO 100000
> REPLACE Res51.C WITH "X"
>ENDFOR
>
>? "100.000 replacements in other workarea", SECONDS() - nSec
>
>SELECT Res51
>INDEX ON C TAG C
>SELECT Res52
>INDEX ON C TAG C
>
>nSec= SECONDS()
>
>SELECT Res51
>FOR nT = 1 TO 100000
> SEEK "X"
>ENDFOR
>
>? "100.000 seeks in current workarea", SECONDS() - nSec
>
>nSec= SECONDS()
>
>SELECT Res52
>FOR nT = 1 TO 100000
> SEEK "X"
>ENDFOR
>
>? "100.000 seeks in other workarea", SECONDS() - nSec
>
>nSec= SECONDS()
>
>SELECT Res51
>FOR nT = 1 TO 100000
> GO 1
>ENDFOR
>
>? "100.000 Go's in current workarea", SECONDS() - nSec
>
>nSec= SECONDS()
>
>SELECT Res52
>FOR nT = 1 TO 100000
> GO 1
>ENDFOR
>
>? "100.000 go's in other workarea", SECONDS() - nSec
Previous
Reply
Map
View

Click here to load this message in the networking platform