Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
JBelthoff
Posting Yak Master
173 Posts |
Posted - 2001-07-14 : 08:19:26
|
Hello,When using VBScript/ASP/ADO inside a page I know that the first query, listed below, will execute faster than the second because the process doesn't have to figure out what the "*" means.But what about the performance inside a Stored procedure. Is there any performance boost from declaring all the fields inside an SP as there is in VBScript/ASP/ADO?As far as SP's go which will be faster if any? My question assumes of course that you do in fact want to retrieve all of the fileds into a recordset.'###########################################'FIRST QUERYSet rs = Server.CreateObject("ADODB.recordset")strSQL = "SELECT MF_Title, MF_Fact, MF_Link, MF_Link_Text, "strSQL = strSQL & "MF_Author, MF_Active, MF_Date "strSQL = strSQL & "FROM METEOR_FACTS"rs.Open strSQL, strConnString, adOpenStatic, adLockOptimistic, adCmdText'SECONDSet rs = Server.CreateObject("ADODB.recordset")strSQL = "SELECT * FROM METEOR_FACTS"rs.Open strSQL, strConnString, adOpenStatic, adLockOptimistic, adCmdText'###########################################'FIRST STORED PROCEDURECREATE PROCEDURE SP_AllMeteorFactsASSELECT MF_Title, MF_Fact, MF_Link, MF_Link_Text, MF_Author, MF_Active, MF_DateFROM METEOR_FACTSGO'SECONDCREATE PROCEDURE SP_AllMeteorFactsASSELECT *FROM METEOR_FACTSGOThanks for your help I am very new to Stored Procedures John Belthoff |
|
|
|
|
|
|
|