Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scalability and SQL Passthrough
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00583556
Message ID:
00596268
Views:
26
Eric,

I have been debating using more than one connection in my app to speed things up but I am running into the same thing that you are. Connections take too long to generate. I was hoping to increase performance using the SQLPREPARE() function to let the server do more of the work. Please let me know if you find any way to speed up connection generation.

Matt



>I have spent the last week or so reading up on remote views and sql passthrough and came to the conclusion that spt is what Im going to use.
>
>I read a discussion on Wiki about this. They argued that spt is better than rv because you can close connections after you done using them unlike rv wich stay open the whole time the view is open. (Better scalability)
>
>So, to the people who use spt, do you keep you connections open throughout your whole program or do you close and open them when you need data?
>
>Here is the clip from wiki...
>
>Scalability
>Remote views are the least scalable of all of the various techniques available because remote views require that a connection is kept open to the database the entire time the remote view is in use. This can be minimized if a middle-tier is used to provide the data, but serving data retrieved via remote views from the middle tier requires additional work.
>Actually, remote views can share a single connection. In most situations all remote views share one connection and all spt traffic can be conducted over a second connection to avoid confusion on the part of the programmer and the application.
>
>SPT, SPT with Stored Procs & ADO are all very scalable. Connections only need to be kept open when data is retrieved and updated. In addition, ADO is the only remote data access technique that natively provides a way to pass data between tiers.
>The problem with ADO is that it requires COM calls for each usage.
>Compare performance between a "scan" loop in VFP going thru a local cursor and doing something with each record and ADO doing the same thing. A very common scenario. The ADO calls mount quickly into the hundreds or even thousands. This causes orders of magnitude performance differences.
>
>Note: Using any technique other than remote views does not necessarily increase scalability. The developer must write code to close connections when they aren't needed and to re-establish connections when they are needed again in order to realize any scalability gains.
>
>Hope you don't mind my commenting here.. I'd be interested to know how many developers actually do open and close connections like this. IME against big oracle patient management databases using SPT, connections can take >2 seconds to establish when all I want is a tiny query to get the patient's address and GP. Users complain. Once the connection is open the query takes <.2 seconds. Users are happy with that. So it is left open. Am I alone? - JohnRyan
>
>
>
>
>
>Eric Stephani
Previous
Reply
Map
View

Click here to load this message in the networking platform