Click here to Skip to main content
15,886,362 members
Home / Discussions / Database
   

Database

 
GeneralRe: sql server 2000 stored procedure Pin
vimal_yet25-Dec-07 22:30
vimal_yet25-Dec-07 22:30 
GeneralRe: sql server 2000 stored procedure Pin
N a v a n e e t h25-Dec-07 23:15
N a v a n e e t h25-Dec-07 23:15 
AnswerRe: sql server 2000 stored procedure Pin
John-ph26-Dec-07 18:34
John-ph26-Dec-07 18:34 
GeneralRe: sql server 2000 stored procedure Pin
N a v a n e e t h26-Dec-07 18:57
N a v a n e e t h26-Dec-07 18:57 
GeneralRe: sql server 2000 stored procedure Pin
John-ph26-Dec-07 19:27
John-ph26-Dec-07 19:27 
GeneralRe: sql server 2000 stored procedure Pin
N a v a n e e t h26-Dec-07 19:37
N a v a n e e t h26-Dec-07 19:37 
GeneralRe: sql server 2000 stored procedure Pin
John-ph26-Dec-07 20:14
John-ph26-Dec-07 20:14 
GeneralRe: sql server 2000 stored procedure Pin
Mike Dimmick31-Dec-07 0:57
Mike Dimmick31-Dec-07 0:57 
As Navaneeth says, SQL Server stored procedures are optimised no differently from other, ad-hoc queries. However, the resulting query plan is given more weight so it is more likely still to be in the cache when the procedure is next executed.

You must be a bit careful that you do not have massively divergent behaviour depending on different values for parameters. The reason for this is that SQL Server will use the previously compiled query plan regardless of the parameters supplied. If a query plan works well for some values of some parameters but not for others - perhaps an index which is very selective for some values but not for others, such as where a column mostly contains the same value but has a few exceptions - you can get better performance by asking SQL Server to recompile the query. Use WITH RECOMPILE with the EXEC statement to do this on a one-off basis, or specify WITH RECOMPILE in the CREATE PROCEDURE/ALTER PROCEDURE statement to force the plan to be recompiled every time.


DoEvents: Generating unexpected recursion since 1991

GeneralIdentity in a field Pin
M. J. Jaya Chitra25-Dec-07 17:03
M. J. Jaya Chitra25-Dec-07 17:03 
GeneralRe: Identity in a field Pin
KANGAROO_25-Dec-07 18:06
KANGAROO_25-Dec-07 18:06 
GeneralRe: Identity in a field Pin
M. J. Jaya Chitra25-Dec-07 19:07
M. J. Jaya Chitra25-Dec-07 19:07 
GeneralRe: Identity in a field Pin
Dave Kreskowiak26-Dec-07 9:09
mveDave Kreskowiak26-Dec-07 9:09 
GeneralRe: Identity in a field Pin
M. J. Jaya Chitra26-Dec-07 16:49
M. J. Jaya Chitra26-Dec-07 16:49 
GeneralRe: Identity in a field Pin
vimal_yet27-Dec-07 1:00
vimal_yet27-Dec-07 1:00 
GeneralRe: Identity in a field Pin
Dave Kreskowiak27-Dec-07 5:07
mveDave Kreskowiak27-Dec-07 5:07 
Generalaccess to temprory table colum in Mysql Pin
sepel24-Dec-07 20:48
sepel24-Dec-07 20:48 
Generalerror in sql 2005 Pin
break_day24-Dec-07 4:24
break_day24-Dec-07 4:24 
GeneralRe: error in sql 2005 Pin
Paul Conrad26-Dec-07 12:12
professionalPaul Conrad26-Dec-07 12:12 
QuestionHow to insert record from XML document without using sp_xml_preparedocument procedure Pin
Software_Guy_12323-Dec-07 22:59
Software_Guy_12323-Dec-07 22:59 
GeneralRe: How to insert record from XML document without using sp_xml_preparedocument procedure Pin
Paul Conrad6-Jan-08 10:01
professionalPaul Conrad6-Jan-08 10:01 
Questionhow can export my image data... Pin
koolprasad200323-Dec-07 18:01
professionalkoolprasad200323-Dec-07 18:01 
AnswerRe: how can export my image data... Pin
Pete O'Hanlon23-Dec-07 23:33
mvePete O'Hanlon23-Dec-07 23:33 
GeneralMySQL and Images [modified] - RESOLVED Pin
Mike L.22-Dec-07 21:56
Mike L.22-Dec-07 21:56 
GeneralRe: MySQL and Images Pin
Paul Conrad23-Dec-07 6:09
professionalPaul Conrad23-Dec-07 6:09 
GeneralRe: MySQL and Images Pin
Mike L.23-Dec-07 11:38
Mike L.23-Dec-07 11:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.