Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server slower than VFP?
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00250319
Message ID:
00250688
Views:
10
>Hello!
>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!
>Mark

There are lot's of issues here. First FP kicks but and is faster on simple stuff like this.

now back to SQL Server.

What type of connection are you using in SQL? Named Pipes? Set up TCPIP and see the time drop considerablely.

What packet size is SQL sending? Is it maximized to your network?

Are you sure that your index is established? Or is it pending a commit?

csqlpass = "MyTable WHERE MyField = 'MyValue'"

SQLEXECUTE(gnhandle, csqlpass, 'my_cursor')

This will work much faster.
Previous
Reply
Map
View

Click here to load this message in the networking platform