Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When does Rushmore Optimize?
Message
From
02/11/1998 22:25:16
 
 
To
02/11/1998 11:57:24
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00153608
Message ID:
00153792
Views:
20
>Hello, All.
>
>We have got a query against 2 VFP6 tables, A_SYS.DBF and XX.DBF. A_SYS.DBF has got 1.3 Million records. XX.DBF has 1 record. The result set has 5 records which match. A_SYS is in a .DBC, XX is a free table.
>
>First we run:
>
>SELECT a_sys.* ;
> FROM a_sys, xx;
> WHERE a_sys.prodrid = xx.prodrid ;
> AND a_sys.affid IN (SELECT affid FROM xx) ;
> INTO CURSOR ctemp
>
>The query take 0.04 seconds to run.
>
>However, when we run:
>
>SELECT a_sys.* ;
> FROM a_sys, xx;
> WHERE a_sys.prodrid = xx.prodrid ;
> AND a_sys.affid = xx.affid ;
> INTO CURSOR ctemp
>
>the query takes approximately 80 seconds to run.
>
>Both files are indexed on affid and prodrid. Both of these fields are of type "integer."
>
>Why does it take so long to join on 2 fields as compared to running the first command? When we test using SYS(3054), it reports that it is not optimizing the 2nd query, and that it is partially optimizing the first.
>
>- George [This makes no sense to me]

There is a document on my web site that discusses Rushmore Optimization. It may give you some ideas.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform