Re: Use of "USE databasename" Within a Stored Procedure
- From: Hugo Kornelis <hugo@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 10 Dec 2005 22:48:50 +0100
On Fri, 9 Dec 2005 15:56:03 -0800, RitaG wrote:
(snip)
>I do have one more question though.
>Is using "sp_executesql @SQL" where there is a "Use databasename" within
>@SQL a lot slower than running the SP within a database?
Hi Rita,
I have no idea. I don't expect to see much speed difference, but I never
tested this.
I prefer not to use dynamic SQL if I can avoid it, for reasons more
compelling than speed. See http://www.sommarskog.se/dynamic_sql.html.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
.
- References:
- Re: Use of "USE databasename" Within a Stored Procedure
- From: Hugo Kornelis
- Re: Use of "USE databasename" Within a Stored Procedure
- From: Hugo Kornelis
- Re: Use of "USE databasename" Within a Stored Procedure
- Prev by Date: Re: Use of "USE databasename" Within a Stored Procedure
- Next by Date: Re: Indexing a table using a Query
- Previous by thread: Re: Use of "USE databasename" Within a Stored Procedure
- Next by thread: Re: Indexing a table using a Query
- Index(es):
Relevant Pages
|
|