SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Automatic Plan Correction


Automatic Plan Correction

Author
Message
WayneS
WayneS
SSC Guru
SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)

Group: General Forum Members
Points: 59353 Visits: 10926
Comments posted to this topic are about the item Automatic Plan Correction

Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
Links: For better assistance in answering your questions, How to ask a question, Performance Problems, Common date/time routines,
CROSS-TABS and PIVOT tables Part 1 & Part 2, Using APPLY Part 1 & Part 2, Splitting Delimited Strings

Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)

Group: General Forum Members
Points: 616610 Visits: 45187
As always, great article with working examples! Thanks for taking the time to post it Wayne.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Alan Burstein
Alan Burstein
SSC-Forever
SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)

Group: General Forum Members
Points: 40317 Visits: 8770
Great article, very helpful. Well done Wayne, 5 stars!

-- Alan Burstein


Helpful links:

Best practices for getting help on SQLServerCentral -- Jeff Moden
How to Post Performance Problems -- Gail Shaw

Nasty fast set-based string manipulation functions:
For splitting strings try DelimitedSplit8K or DelimitedSplit8K_LEAD (SQL Server 2012+)
To split strings based on patterns try PatternSplitCM
Need to clean or transform a string? try NGrams, PatExclude8K, PatReplace8K, DigitsOnlyEE, or Translate8K

I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code. -- Itzik Ben-Gan 2001

WayneS
WayneS
SSC Guru
SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)

Group: General Forum Members
Points: 59353 Visits: 10926
Thanks Jeff and Alan. I'm glad that you liked it.

Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
Links: For better assistance in answering your questions, How to ask a question, Performance Problems, Common date/time routines,
CROSS-TABS and PIVOT tables Part 1 & Part 2, Using APPLY Part 1 & Part 2, Splitting Delimited Strings

Jason A. Long
Jason A. Long
SSChampion
SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)

Group: General Forum Members
Points: 11791 Visits: 6445
5 stars from me as well...
Legend has it, the new system will also be able to recommend altering to existing indexes and/or suggest filtered indexes... Basically a DTA that doesn't suck...
So, I'll definitely be keeping an eye out for so see if this becomes a series.
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)

Group: General Forum Members
Points: 616610 Visits: 45187
Jason A. Long - Monday, November 20, 2017 5:13 PM
Basically a DTA that doesn't suck...

Heh... THAT, my friend, has yet to be seen both on the regressive plans and the index recommendations. Wink


--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Alan Burstein
Alan Burstein
SSC-Forever
SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)

Group: General Forum Members
Points: 40317 Visits: 8770
Jeff Moden - Monday, November 20, 2017 7:04 PM
Jason A. Long - Monday, November 20, 2017 5:13 PM
Basically a DTA that doesn't suck...

Heh... THAT, my friend, has yet to be seen both on the regressive plans and the index recommendations. Wink

... and the genius index naming convention Hehe


-- Alan Burstein


Helpful links:

Best practices for getting help on SQLServerCentral -- Jeff Moden
How to Post Performance Problems -- Gail Shaw

Nasty fast set-based string manipulation functions:
For splitting strings try DelimitedSplit8K or DelimitedSplit8K_LEAD (SQL Server 2012+)
To split strings based on patterns try PatternSplitCM
Need to clean or transform a string? try NGrams, PatExclude8K, PatReplace8K, DigitsOnlyEE, or Translate8K

I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code. -- Itzik Ben-Gan 2001

Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)

Group: General Forum Members
Points: 616610 Visits: 45187
Alan.B - Monday, November 20, 2017 7:11 PM
Jeff Moden - Monday, November 20, 2017 7:04 PM
Jason A. Long - Monday, November 20, 2017 5:13 PM
Basically a DTA that doesn't suck...

Heh... THAT, my friend, has yet to be seen both on the regressive plans and the index recommendations. Wink

... and the genius index naming convention Hehe

BWAAAA-HAAAAA!!!!! I was just thinking that and also thinking "thank goodness it wasn't XML". Wink

I'm also thinking they HAD to name the way they did or their recommendations for keys and includes would very quickly outstrip the 128 character object limit if actual column names were used... especially with how some people name columns. At least they used something logical that could actually be split and rendered to come up with the column names.

Of course, Index001, Index002, etc, might not have been the end of the world.


--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Jason A. Long
Jason A. Long
SSChampion
SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)

Group: General Forum Members
Points: 11791 Visits: 6445
Jeff Moden - Monday, November 20, 2017 7:04 PM
Jason A. Long - Monday, November 20, 2017 5:13 PM
Basically a DTA that doesn't suck...

Heh... THAT, my friend, has yet to be seen both on the regressive plans and the index recommendations. Wink

That was pretty much my reaction when I heard about it about a year ago from our MS Support Engineer...
IIRC, it's supposed to be able to implement it's recommendations, including the alter index, automagically.
I think my 1st comment was, "Sounds fantastic! ...<something about DTA making equally glorious promise... laughing a little>... What will we need to do to turn it off?"

Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)SSC Guru (616K reputation)

Group: General Forum Members
Points: 616610 Visits: 45187
Jason A. Long - Monday, November 20, 2017 7:47 PM
Jeff Moden - Monday, November 20, 2017 7:04 PM
Jason A. Long - Monday, November 20, 2017 5:13 PM
Basically a DTA that doesn't suck...

Heh... THAT, my friend, has yet to be seen both on the regressive plans and the index recommendations. Wink

That was pretty much my reaction when I heard about it about a year ago from our MS Support Engineer...
IIRC, it's supposed to be able to implement it's recommendations, including the alter index, automagically.
I think my 1st comment was, "Sounds fantastic! ...<something about DTA making equally glorious promise... laughing a little>... What will we need to do to turn it off?"


Too funny! After I read Wayne's good article, the first thing that came to mind was "How do I turn it off"? Wink

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search