March 24, 2010 at 1:23 am
HELLO TEAM, I need a help on statement level recompile (syntax level) that can implement in sql server 2005/2008
March 24, 2010 at 3:43 am
Hi,
Probably best off looking up Query Hints in BOL:
http://msdn.microsoft.com/en-us/library/ms181714.aspx
It's pretty straight forward
March 24, 2010 at 5:34 am
Everything anyone ever needs to know about compilation and recompilation:
http://msdn.microsoft.com/en-us/library/cc966425.aspx#XSLTsection127121120120
That link will take you to the section on statement-level recompilation.
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
March 24, 2010 at 5:56 am
Thanks!!!
Still I could n't the thread of Statement Level Recompilation in the specified link
March 24, 2010 at 7:00 am
Maybe you are looking for something like this:
SELECT TOP (10) *
FROM table
OPTION (HASH Join , recompile)
-- or just simple: OPTION (recompile)
March 24, 2010 at 7:16 am
r.dragoi-1095738 (3/24/2010)
Maybe you are looking for something like this:SELECT TOP (10) *
FROM table
OPTION (HASH Join , recompile)
-- or just simple: OPTION (recompile)
What's the HASH JOIN hint for? There's no join.
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
March 24, 2010 at 7:23 am
In my own query I had a few more tables, but it can used just like I said OPTION (Recompile)
March 24, 2010 at 7:30 am
Anu-923127 (3/24/2010)
Still I could n't the thread of Statement Level Recompilation in the specified link
The link takes you straight to it...? :unsure:
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
March 24, 2010 at 7:34 am
r.dragoi-1095738 (3/24/2010)
In my own query I had a few more tables, but it can used just like I said OPTION (Recompile)
Still begs the question, why are you forcing hash joins?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 24, 2010 at 7:49 am
We have some data warehouse applications and some tables which are not indexed etc , in such cases we use it.
March 24, 2010 at 8:08 am
r.dragoi-1095738 (3/24/2010)
We have some data warehouse applications and some tables which are not indexed etc , in such cases we use it.
Um..... ok......
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply