April 5, 2015 at 3:27 am
Comments posted to this topic are about the item Query Hints
April 5, 2015 at 3:30 am
A good ( and interesting ) question that I have been able to reply only because I remembered a SQL Server Days session which was about the query hints and the plan recompiles.
Thanks for it.
April 5, 2015 at 3:41 am
Only using KEEP PLAN, didn`t use the rest yet.
Thanks & Best Regards,
Hany Helmy
SQL Server Database Consultant
April 5, 2015 at 6:06 pm
Thanks Steve for the question. I scored 1 mark.
But, one question, does this option has any real significance? Can you please suggest in which circumstances DBA should look for enforcing this option?
Have a great weekend.
Thanks.
April 6, 2015 at 1:35 am
April 6, 2015 at 2:14 am
patricklambin (4/6/2015)
Hi SQL-DBA-01 ,it seems that KEEPPLAN is for mainly for queries using many temp tables
See :
I found only these links which could be interesting for you.
Cannot see this as specific to temp tables ( more like any high activity tables )
😎
Forces the query optimizer to relax the estimated recompile threshold for a query. The estimated recompile threshold is the point at which a query is automatically recompiled when the estimated number of indexed column changes have been made to a table by running UPDATE, DELETE, MERGE, or INSERT statements. Specifying KEEP PLAN makes sure that a query will not be recompiled as frequently when there are multiple updates to a table.
April 6, 2015 at 5:09 am
Thanks. I had to research this one, which is a good way to get the brain moving on a Monday morning.
April 6, 2015 at 6:48 am
Thanks for the question.
April 6, 2015 at 6:57 am
Good one, Steve.
---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
April 6, 2015 at 7:09 am
Good one, Thanks Steve
April 6, 2015 at 11:11 am
Thank you for the post, Steve, really interesting one.
ww; Raghu
--
The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.
April 7, 2015 at 12:49 am
Nice question, thanks.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply