Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Network Optimization
Message
From
08/12/2007 20:45:04
 
 
To
29/11/2007 08:45:33
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01272008
Message ID:
01274228
Views:
10
Quick reply.

Do you have any evidence that this is a bottleneck in practice?

If so, and since this is a relatively small (these days) static file, I would definitely consider copying it to a local drive.

I have a procedure that compares time stamps and updates a local copy whenever they are different.

Peter



>I have a new application that I'm releasing soon and I'm wondering about network performance.
>
>The primary bottleneck will be execution of a single SQL statement that will look much like this (it will be different each time, but this is a reasonable example). This SQL is called for each single form the user looks at.
>
>
Select {some_fields} from SalesSummary                     ;
>into cursor cBrowse readwrite                                  ;
>;
>Where Between( period, lnFirstPeriod, lnLastPeriod) ;
>And SalesSummary.CustNumber in (Select CustNumber from CustomerSummary;
>      where ACustClass in (select Left(DrillValue,20) from cDrillDown where Depth = 1)) ;
>And SalesSummary.CustNumber in (Select CustNumber from CustomerSummary ;
>     where ACustID in (select Left(DrillValue,15) from cDrillDown where Depth = 2));
>group by {some_other_fields}
>
>Two questions:
>(1) SalesSummary is a free table on a network. It is skinny (60 bytes) with about 500K records. It also is, in effect, read-only ... it is created hourly elsewhere, and this application merely reads it. Would it be more efficient to copy this file to a local TEMP directory instead of reading it over the network?
>
>(2) Would it be more efficient to eliminate one level of the subqueries, like this?
>
>
Select CustNumber from CustomerSummary;
>      where ACustClass in (select Left(DrillValue,20) from cDrillDown where Depth = 1);
>      into cursor cTemp1
>
>Select CustNumber from CustomerSummary ;
>     where ACustID in (select Left(DrillValue,15) from cDrillDown where Depth = 2);
>     into cursor cTemp2
>
>Select {some_fields} from SalesSummary                     ;
>into cursor cBrowse readwrite                                  ;
>;
>Where Between( period, lnFirstPeriod, lnLastPeriod)    ;
>And SalesSummary.CustNumber in (Select * from cTemp1)  ;
>And SalesSummary.CustNumber in (Select * from cTemp2  );
>group by {some_other_fields}
Peter Robinson ** Rodes Design ** Virginia
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform