Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FP 2.6 DOS vs VFP 6.0 Queries
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00397723
Message ID:
00397797
Vues:
10
>I am converting an app from FP 2.6 DOS to VFP 6.0. The queries for reports in the FP DOS app take a second or two. In the VFP app they take 30 seconds. However, if I run the same queries from the VFP command window they only take a second or two.
>
>Is there a setting in VFP that would cause this difference?

Lots of things. Make sure you're comparing apples to apples. If the query in the VFP app is significantly slower, check the syntax of the WHERE clause to make sure that the various expressions tested exactly match the index expressions of the indexes; for example, if an index exists on CustID + InvoiceID, but no index exists on just CustID, the following two select statements will perform differently:

SELECT * FROM InvHead WHERE CustID = "CUST01"
SELECT * FROM InvHead WHERE CustID + InvoiceID = "CUST01"

The second statement is Optimizable, while the first is not, since the second's expression matches the index key precisely, but the first does not.

Make certain that comparisons are on equivalent environments. FPDOS may be getting access to more memory for buffering than VFP, because of how the DOS PIF configures memory and the limits established for VFP by SYS(3050).

Make sure that the systems use the same data sources. Comparing FPDOS using local files to VFP using files on another machine across a LAN connection is not equivalent; the LAN is usually slower than a local hard disk.

Eliminate screen I/O during the benchmark; updating the display in a GUI often is slower than DOS screen I/O.

If the measure of query time is how long it takes to print the result, especially output to a DMP or inkjet, realize that FPDOS sends ASCII streams for printing to the printer, where a WinApp probably is rendering the output graphically, which takes considerably longer to create. An ASCII character is one byte; depending on resolution, the rendition of one character graphically may take 10-50x the number of bytes, and the character is generated a graphical row at a time, requiring several passes to print one line.

There are times where FPDOS will outperform VFP on a single task; it's unlikely here, though, since the run times comparing FPDOS to running the same query from the VFP command box appear to take about the same time under FPDOS and VFP outside your app.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform