Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL stored procedure vs VB SELECT-SQL statement. Which is faster? 2

Status
Not open for further replies.

EdenD

Programmer
Jun 1, 2001
13
0
0
PH
My group in the development team is evaluating ways by which we can retrieve records the fastest way. Our database is MS SQL and our programming language is VB 6.0. My question is which is faster in terms of record retrieval, SQL's view or programmatically bound a control's recordsource to a SELECT-SQL statement? Another question, can anyone give me the disadvantages and advantages of using SQL-views, SQL stored proceudre, and SELECT-SQL statement in VB? I appreciate a lot whatever information you can extend. Thanx.
 
Stored Procedure is always faster, than using a Select - SQL statement in VB.

This is because when a stored proc. is created a query, the stored proc. is compiled and a query execution plan for that is prepared and kept in the cache.

This plan is used whenever the stored proc. is invoked from any application like VB.

So if you are planning a VB 6/SQL Server application, go for stored procedures.


Mukund.
 
There is a little problem here.
The bigger the system gets, the better scaleability is nessesary. Thats why SP´s isn't always the best solution.
If bigger system i'd say COM or DCOM. (Loadbalancing is possible)..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top