Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Dynamic Query
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

19 Posts

Posted - 03/13/2013 :  06:34:25  Show Profile  Reply with Quote
Dynamic query will take time to execute? What is the difference between Select query inside Query string and outside of Query string? Which one will take time to execute.?

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 03/13/2013 :  06:41:08  Show Profile  Reply with Quote
depends on the query always. Cant say always dynamic will take time or vice versa. One thing to note is dynamic sql using sp_executesql will have ability to cache plans as against ones using EXEC()

SQL Server MVP

Go to Top of Page

Starting Member

19 Posts

Posted - 03/14/2013 :  03:39:40  Show Profile  Reply with Quote
Thanks for ur reply.
So you mean to say,If query has been written by using SP_ExecuteSQL command,then it will take time to execute.

Edited by - suriyarupa on 03/14/2013 03:40:23
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000