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


SQL Server Execution Plans


SQL Server Execution Plans

Author
Message
Trey Staker
Trey Staker
SSCarpal Tunnel
SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)

Group: General Forum Members
Points: 4246 Visits: 2790
Grant, Thanks for writing this book and thanks to you and red gate for putting online for free in PDF format.

---------------------------------------------------------------------
Use Full Links:
KB Article from Microsoft on how to ask a question on a Forum
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (354K reputation)SSC Guru (354K reputation)SSC Guru (354K reputation)SSC Guru (354K reputation)SSC Guru (354K reputation)SSC Guru (354K reputation)SSC Guru (354K reputation)SSC Guru (354K reputation)

Group: General Forum Members
Points: 354526 Visits: 34355
Ninja's_RGR'us (7/11/2011)
Hey grant I've surfed to http://www.scarydba.com/2008/07/02/code-from-dissecting-sql-server-execution-plans/ to download the code of the book and I just can't seem to find the download button.

Care to help a blind man?


Not sure. I usually just google for it. It's online somewhere, either here or over at Red Gate.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
Product Evangelist for Red Gate Software
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (354K reputation)SSC Guru (354K reputation)SSC Guru (354K reputation)SSC Guru (354K reputation)SSC Guru (354K reputation)SSC Guru (354K reputation)SSC Guru (354K reputation)SSC Guru (354K reputation)

Group: General Forum Members
Points: 354526 Visits: 34355
CDA (7/11/2011)
first great book; thanks for the free download.

I've passed this on to my team for recommended reading.

second question: why does the word Kindle in front of Ebook bump the price 10 bucks? Smile


Not a clue. But if you search for it, you can get it as a PDF for free.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
Product Evangelist for Red Gate Software
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (354K reputation)SSC Guru (354K reputation)SSC Guru (354K reputation)SSC Guru (354K reputation)SSC Guru (354K reputation)SSC Guru (354K reputation)SSC Guru (354K reputation)SSC Guru (354K reputation)

Group: General Forum Members
Points: 354526 Visits: 34355
Trey Staker (7/11/2011)
Grant, Thanks for writing this book and thanks to you and red gate for putting online for free in PDF format.



Thanks. I hope it's helpful.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
Product Evangelist for Red Gate Software
Hardy21
Hardy21
SSCrazy Eights
SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)

Group: General Forum Members
Points: 8914 Visits: 1399
Really nice book. Thanks Grant Fritchey

Thanks
Laurence Neville
Laurence Neville
Mr or Mrs. 500
Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)

Group: General Forum Members
Points: 579 Visits: 182
Hi Grant,
One question about the book:

You refer a couple of times to indexed views that "only refresh once per day". My understanding was that indexed views are updated instantly when base table data is updated, and I can only find references to Oracle materialised views having this "refresh" function. Is there something I am missing?

Thanks
Ninja's_RGR'us
Ninja's_RGR'us
SSC Guru
SSC Guru (262K reputation)SSC Guru (262K reputation)SSC Guru (262K reputation)SSC Guru (262K reputation)SSC Guru (262K reputation)SSC Guru (262K reputation)SSC Guru (262K reputation)SSC Guru (262K reputation)

Group: General Forum Members
Points: 262429 Visits: 9673
Laurence Neville (11/11/2011)
Hi Grant,
One question about the book:

You refer a couple of times to indexed views that "only refresh once per day". My understanding was that indexed views are updated instantly when base table data is updated, and I can only find references to Oracle materialised views having this "refresh" function. Is there something I am missing?

Thanks



It's probably something like a temp reporting table loaded from a view.

Your understanding of the indexed views is correct.
s.pig.snow
s.pig.snow
SSC Rookie
SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)

Group: General Forum Members
Points: 25 Visits: 4
Grant, I confused for a question when I'm reading <Dissecting SQL Server
Execution Plans>:


Following two T-SQL generate two different plans, but I don't know why:

--Clustered index scan
SELECT ContactID,LastName,EmailAddress FROM person.Contact WHERE EmailAddress LIKE 'sa%'
--NonClustered index seek and Key Lookup
SELECT ContactID,LastName,EmailAddress FROM person.Contact WHERE EmailAddress LIKE 'sab%'


Would you give me some suggestion please?
Thanks a lot.

s.pig.snow@gmail.com
Ninja's_RGR'us
Ninja's_RGR'us
SSC Guru
SSC Guru (262K reputation)SSC Guru (262K reputation)SSC Guru (262K reputation)SSC Guru (262K reputation)SSC Guru (262K reputation)SSC Guru (262K reputation)SSC Guru (262K reputation)SSC Guru (262K reputation)

Group: General Forum Members
Points: 262429 Visits: 9673
Sab must return less rows.

An index seek + bookmark lookup is a very costly operation. It takes very little data returned to make a table scan more efficient than a seek + lookup.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (903K reputation)SSC Guru (903K reputation)SSC Guru (903K reputation)SSC Guru (903K reputation)SSC Guru (903K reputation)SSC Guru (903K reputation)SSC Guru (903K reputation)SSC Guru (903K reputation)

Group: General Forum Members
Points: 903283 Visits: 48750
This: http://sqlinthewild.co.za/index.php/2009/01/09/seek-or-scan/

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

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


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