Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server slower than VFP?
Message
From
16/08/1999 07:12:34
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00250319
Message ID:
00253974
Views:
18
>I have a table setup in a SQL Server 7.0 database with 1.5 million records. Doing a very simple query, on an indexed field, in the Query Analyzer on the server machine itself, seems very slow. -Considerably slower than running the same query on a VFP table on the same machine. I'm talking about 27 seconds for a return of 12,000 records from a query like:
>
>SELECT MyField FROM MyDBC.dbo.MyTable WHERE MyField = 'MyValue'
>
>There is an index on MyField.
>The statistics report usually shows about 23 logical reads.
>
>There has to be something I'm doing wrong. Any suggestions would be very appreciated!

At a first guess, it sounds like you are seeing one of VFP's rushmore tricks in action. If the index is relatively small then vfp can often beat out sql servers on a simple record access. The reason is ... it only brings the index across the network. Then just retrieves the records it needs. With caching and various rushmore optimisations it can really get up and move.

For a better test of sql over vfp however ... try running a sum on all those 1.5 milling records. Then you will see a big difference

SQL sends just one record as the result ... VFP has to pull all records over the net to get the result.
Previous
Reply
Map
View

Click here to load this message in the networking platform