Pro SQL Server 2022 Wait Statistics: A Practical Guide to Analyzing Performance in SQL Server and Azure SQL Database, 3rd Edition Thomas Larock download
Pro SQL Server 2022 Wait Statistics: A Practical Guide to Analyzing Performance in SQL Server and Azure SQL Database, 3rd Edition Thomas Larock download
https://ebookmeta.com/product/pro-sql-server-2022-wait-
statistics-a-practical-guide-to-analyzing-performance-in-sql-
server-and-azure-sql-database-3rd-edition-thomas-larock/
https://ebookmeta.com/product/pro-sql-server-2019-wait-
statistics-a-practical-guide-to-analyzing-performance-in-sql-
server-second-edition-enrico-van-de-laar/
https://ebookmeta.com/product/expert-performance-indexing-in-
azure-sql-and-sql-server-2022-fourth-edition-edward-pollack/
https://ebookmeta.com/product/escaping-hitler-a-jewish-haven-in-
chile-1st-edition-eva-goldschmidt-wyman/
Inspector Singh Investigates A Frightfully English
Execution First Edition Flint Shamini
https://ebookmeta.com/product/inspector-singh-investigates-a-
frightfully-english-execution-first-edition-flint-shamini/
https://ebookmeta.com/product/minimally-invasive-spine-surgery-
surgical-techniques-and-disease-management-2nd-edition-frank-m-
phillips/
https://ebookmeta.com/product/comptia-a-complete-practice-tests-
core-1-exam-220-1101-and-core-2-exam-220-1102-3rd-edition-audrey-
oshea/
https://ebookmeta.com/product/global-literacy-in-local-learning-
contexts-connecting-home-and-school-1st-edition-mary-faith-mount-
cors/
https://ebookmeta.com/product/young-architects-12-resource-1st-
edition-the-architectural-league-of-new-york/
Undocumented and in College Students and Institutions
in a Climate of National Hostility 1st Edition Terry-
Ann Jones
https://ebookmeta.com/product/undocumented-and-in-college-
students-and-institutions-in-a-climate-of-national-hostility-1st-
edition-terry-ann-jones/
Pro
SQL Server 2022
Wait Statistics
A Practical Guide to Analyzing Performance
in SQL Server and Azure SQL Database
—
Third Edition
—
Thomas LaRock
Enrico van de Laar
Pro SQL Server 2022
Wait Statistics
A Practical Guide to Analyzing
Performance in SQL Server and Azure
SQL Database
Third Edition
Thomas LaRock
Enrico van de Laar
Pro SQL Server 2022 Wait Statistics: A Practical Guide to Analyzing Performance in
SQL Server and Azure SQL Database
Thomas LaRock Enrico van de Laar
East Longmeadow, MA, USA Drachten, The Netherlands
Introduction������������������������������������������������������������������������������������������������������������xxi
v
Table of Contents
sys.dm_exec_requests��������������������������������������������������������������������������������������������������������������� 35
Understanding sys.dm_exec_requests��������������������������������������������������������������������������������� 35
Querying sys.dm_exec_requests������������������������������������������������������������������������������������������ 36
sys.dm_exec_session_wait_stats���������������������������������������������������������������������������������������������� 38
Combining DMVs to Detect Waits Happening Now��������������������������������������������������������������������� 40
Viewing Wait Statistics Using Perfmon��������������������������������������������������������������������������������������� 45
Capturing Wait Statistics Using Extended Events����������������������������������������������������������������������� 47
Capture Wait Statistics Information for a Specific Query������������������������������������������������������ 49
Analyzing Wait Statistics on a Per-Query Basis Using Execution Plans�������������������������������������� 59
Summary������������������������������������������������������������������������������������������������������������������������������������ 63
vi
Table of Contents
vii
Table of Contents
viii
Table of Contents
SLEEP_BPOOL_FLUSH�������������������������������������������������������������������������������������������������������������� 181
What Is the SLEEP_BPOOL_FLUSH Wait Type?�������������������������������������������������������������������� 181
SLEEP_BPOOL_FLUSH Example������������������������������������������������������������������������������������������ 184
Lowering SLEEP_BPOOL_FLUSH Waits������������������������������������������������������������������������������� 186
SLEEP_BPOOL_FLUSH Summary���������������������������������������������������������������������������������������� 187
WRITE_COMPLETION����������������������������������������������������������������������������������������������������������������� 187
What Is the WRITE_COMPLETION Wait Type?���������������������������������������������������������������������� 187
WRITE_COMPLETION Example��������������������������������������������������������������������������������������������� 188
Lowering WRITE_COMPLETION Waits���������������������������������������������������������������������������������� 188
WRITE_COMPLETION Summary������������������������������������������������������������������������������������������� 189
ix
Table of Contents
x
Table of Contents
sys.dm_os_latch_stats������������������������������������������������������������������������������������������������������� 240
Page-Latch Contention�������������������������������������������������������������������������������������������������������� 241
PAGELATCH_[xx]����������������������������������������������������������������������������������������������������������������������� 244
What Is the PAGELATCH_[xx] Wait Type?����������������������������������������������������������������������������� 244
PAGELATCH_[xx] Example��������������������������������������������������������������������������������������������������� 245
Lowering PAGELATCH_[xx] Waits����������������������������������������������������������������������������������������� 250
PAGELATCH_[xx] Summary�������������������������������������������������������������������������������������������������� 255
LATCH_[xx]�������������������������������������������������������������������������������������������������������������������������������� 256
What Is the LATCH_[xx] Wait Type?������������������������������������������������������������������������������������� 256
LATCH_[xx] Example������������������������������������������������������������������������������������������������������������ 257
Lowering LATCH_[xx] Waits������������������������������������������������������������������������������������������������� 262
LATCH_[xx] Summary���������������������������������������������������������������������������������������������������������� 263
PAGEIOLATCH_[xx]�������������������������������������������������������������������������������������������������������������������� 263
What Is the PAGEIOLATCH_[xx] Wait Type?�������������������������������������������������������������������������� 264
PAGEIOLATCH_[xx] Example������������������������������������������������������������������������������������������������ 266
Lowering PAGEIOLATCH_[xx] Waits������������������������������������������������������������������������������������� 268
PAGEIOLATCH_[xx] Summary���������������������������������������������������������������������������������������������� 272
xi
Table of Contents
REDO_THREAD_PENDING_WORK���������������������������������������������������������������������������������������������� 292
What Is the REDO_THREAD_PENDING_WORK Wait Type?��������������������������������������������������� 292
REDO_THREAD_PENDING_WORK Summary������������������������������������������������������������������������ 294
xii
Table of Contents
xiii
Table of Contents
Index��������������������������������������������������������������������������������������������������������������������� 391
xiv
About the Authors
Thomas LaRock has over 20 years of IT experience holding administrator roles. He is
a Microsoft Certified Master in SQL Server and a Microsoft Data Platform MVP since
2009. LaRock has spent much of his career working with data and databases, which led
to his selection as a Technical Advocate for Confio Software in 2010 for the software now
known as SolarWinds Database Performance Analyzer (DPA).
Currently, he serves as a Head Geek for SolarWinds, a company specializing in
software for enterprise infrastructure monitoring. This role allows for LaRock to work
with a variety of customers, helping to solve questions regarding network, application,
and database performance tuning and virtualization. You can reach Thomas through his
blog (thomaslarock.com/blog) and find him on Twitter (@SQLRockstar).
Enrico van de Laar has been working with data in various formats and sizes for over
15 years. He is a data and advanced analytics consultant for DataHeroes where he helps
organizations optimize their data platform environment and helps them with their first
steps in the world of advanced analytics. He is a Data Platform MVP since 2014 and a
frequent speaker on various data-related events throughout the world. He frequently
blogs about technologies such as Microsoft SQL Server and Azure Machine Learning on
his blog at enricovandelaar.com. You can contact Enrico on Twitter at @evdlaar.
xv
Another Random Scribd Document
with Unrelated Content
walk straight; do you not see that you exact the impossible? I tell
you, ladies, that poor human nature is full of weaknesses, and
having once perceived certain infirmities in your neighbor, keep
them in remembrance, and don't demand a reform in what cannot
be corrected. "Bear ye one another's burdens," said Saint Paul; it is
the rule of true wisdom, of peace and domestic happiness: "Alter
alterius onera portate." [Footnote 217]
Well and good, I hear you say. You have just spoken of those who
keep many servants; I am more modest; a nurse, or at most a
cook, constitutes my household. In this case, if you will permit me,
I will find you an establishment where the retainers are numerous
and very difficult to govern. The fathers of the church teach us that
the human soul, in its organization, is a house complete in itself.
We find in it intelligence, the soul properly called, the imagination,
and the senses. Intelligence is the husband, the soul the wife; and
imagination, with its numerous caprices, represents an
establishment of troublesome servants; while the five senses may
portray five grooms at the carriage-ways opening into the street. To
listen to such a world as this, and make it agree, is no easy matter.
Intelligence wishes one thing, the soul another; the husband and
wife are just ready to quarrel. Then imagination comes in with its
thousand phantoms, its fantastical noises, its clatter by night and
by day: can you not believe your household in good condition to
exercise your patience? Then the porters of this castle, the eyes,
the ears, without considering the nerves—a sort of busy battalion
which makes more noise than all the rest. What an interior! what
confusion! what a tower of Babel! Ladies, I will repeat here the
words of Scripture: "Rise early to give work and a portion" to this
establishment of servants; put them in order from the first dawn of
day. Clear up your imagination; it needs more time and care than a
disordered head of hair. See how your ideas fly hither and thither;
how the mad one of this dwelling sings and grows impertinent;
how she reasons, how she scolds, and how absurd she is.
Intelligence would restore her reason; useless to try! time lost! She
cries louder, and becomes longer and more violently nonsensical.
She makes so much noise that it could be called, according to Saint
Gregory, the multiplied voices of several servants, whose tongues
are perfectly sharpened: "Cogitationum se clamor, velut
garrula ancillarum turba, multiplicat." [Footnote 218]
......
One loving hand which has traced this beautiful story whose
outlines we have thus roughly reproduced, has illustrated it with
many touching reminiscences of the other members of the
charming family circle, of which Albert and Alexandrine are the
central figures. There is an exquisite pathos in every page, and
"I will do it," said our Lord, "but on condition that you never ask
for money, and only for those things of which you have need."
So, for a long time, things went well; the sack filled only with
bread, fruits, beans, and other vegetables; and often it was
emptied for the benefit of the poor. But alas! who can say they
may not enter into temptation? One morning Christopher was
passing through the street of a neighboring town, when he stopped
before the shop of a money-changer. He did wrong, for all those
heaps of money excited his curiosity and gave him very bad
thoughts.
"See," said the wicked broker to him, "what you can do with all this
money! You can rebuild the huts of the poor, and make life for
them so happy and desirable. Don't you wish it was all yours?"
Christopher had a moment of weakness, and the money jumped
into his bag. But don't be severe: Christopher was not yet the saint
he afterward became, only a mere mortal man. So this first failing
led to others, and while it must be confessed he was very generous
to the poor, he loved his own good cheer and did not hesitate to
enjoy it. So one day, as he was reposing on the grass after an
unusually good dinner, the devil passed that way, and began to
bully him and crack some of his disagreeable jokes. Christopher
was not remarkably patient, his fists were itching for a fight, so in a
moment he was on his feet and pitched into the devil right royally.
As the forces were pretty equal, the battle lasted two days, and the
end could not be foreseen. The thick grass disappeared from under
their feet, and from afar the noise of the blows resounded like two
hammers falling and refalling one upon the other. They would have
been at it yet if Christopher had not happily thought of his sack.
"Ah cursed devil! by the virtue of our Lord thou shalt enter my
sack." So in he popped, and Christopher was not slow to draw the
cords tight and swing him over his shoulders, while he wondered at
the same time how in the world he would ever get rid of him. A
forge appeared as he walked, and two brawny men were beating
the red fire with tremendous blows. This gave him an idea; so he
addressed himself to the smiths, and said: "I have got a wicked
animal in my bag; I could not pretend to tell you all the villanous
tricks he has played in his life; so, if you will forge him until he is
about as thick as a sixpenny piece, I will give you a crown." They
consented; and, notwithstanding the cries and somersaults of the
devil, they hammered and beat him the whole night long. When
the day dawned, a weak voice cried out, "Christopher, Christopher,
I give up; what shall I do to get out of this?"
"Very well; get out with you, and I will not say Au revoir."
From this moment, Christopher entirely changed his life, only
occupied himself in good works, and, when he grew too feeble to
be ferryman for the river Scorff, he retired into the little hermitage,
upon the ruins of which is built the chapel still to be seen. There he
lived in prayer and penitence, and was visited by many pilgrims,
who were attracted by his great reputation of sanctity. However,
when after his death he presented himself to St. Peter, who, we
know, holds the keys of Paradise, he was refused admittance,
because the latter said he had formerly rejected his advice, and he
feared to let him in.
"It is true I knew the facts mentioned there before, but never
were they so fully brought home to me as in reading that
article. I could say nothing but 'Mea culpa, mea culpa.'
"Father Farrelly is doing a noble work. God bless him for it! And
as to the Reformatory established by Dr. Ives, only God can
know the good it has already done and is yet to do. Catholics
are not accustomed to speak much of what they do, but we
who have done little or nothing cannot shelter ourselves behind
those who, alone and single-handed as it were, have tried to
meet this torrent of poverty and crime. As an act of reparation
on my part for past neglect, I place in your hands a check for
one thousand dollars, ($1000,) as a beginning of this noble
work. The Sisters of Charity or Mercy will surely be ready to
take charge of such a house, for where will they find so true a
work of charity or mercy?
"Yours, etc.,
......"
New Publications
Problems of the Age: With Studies in St. Augustine on Kindred
Topics.
By the Rev. Augustine F. Hewit, of the Congregation of St. Paul.
New York: Catholic Publication House. 1868.
Sidney Smith's coarse pun on the name of St. Peter, and the
author's own very dull attempt at wit in regard to the relics of the
martyrs in the church of St. Ursula, at Cologne, will not render the
book any the more agreeable to Catholic tourists, and we should
think not to any persons of refined taste. The allusions made
occasionally to the supposed vicious propensities of a certain class
of tourists are still more objectionable. They are like whispering
behind the hand, or exchanging nods and winks, in good company.
The guidebooks of Paris are models of the most perfect taste and
elegance in style, and so are those of Baedeker, for the continent,
with the exception of an occasional falsehood or sneer about
something Catholic. In our judgment, these are the proper models
to imitate.
This is an excellent little book for tourists to Lake George and the
surrounding country. The first white man who saw Lake George
was the Jesuit missionary, Father Jogues, who, having arrived at
that beautiful lake on the eve of the festival of Corpus Christi,
called it "The Lake of the Blessed Sacrament," a name it retained
until changed by the English to its present one. The author takes
pains to correct the many misstatements of other writers with
regard to historical events which occurred in the vicinity of the lake.
The account of the defeat of the English by Montcalm, 1757, is
given; and the reported connivance of that general in the massacre
of the English troops after their surrender is disposed of as one of
the "wild exaggerations of the day." Yet it is only a few years ago
that a distinguished general, while on a visit to the lake, reiterated,
in a speech to his admirers, the terrible cruelty of the French in
allowing the captives to be massacred in cold blood, and asserted
that it was one of the customs of that barbarous age, and therefore
was not prevented by Montcalm. Mr. De Costa says, with reference
to this reported massacre: "That class of writers who furnish what
may be called apocrypha of history, have delighted in wild
exaggerations of this event. Drawing their material from the crudest
sensation accounts of the day, they have not hesitated to record as
facts the most improbable fancies. It is to be regretted that these
accounts have crept into so many of our popular school histories, in
one of which, now extensively used, we are informed that, when
Montcalm went away, he left the dead bodies of one hundred
women shockingly mangled and weltering in their blood. The
account is based upon a supposed letter of Putnam's that was
never written, and is of the same authority as that favorite but now
exploded story of the school-boy, which relates Putnam's descent
into the wolfs den." He also truly says that "national enmity has
had much to do with these misrepresentations of Montcalm, who
was every way a noble and humane man, as well as the ablest
general of his day in all North America." Religious animosity had its
share in it, too, and no small share either. The French were
Catholics; the English, Protestants; and it was only in perfect
keeping with the English literature of the day to paint everything
done by the French Catholics in the darkest colors possible. But this
calumny cannot stand the tests of the critic of to-day, and we are
glad to see a little hand-book like this, which must become popular
with the tourist of the Northern lakes, stamp the fictions which
have crept into history as they deserve, and give its readers the
truth.
Histoire De France.
Par V. Duruy.
Nouvelle Edition, illustrée d'un grand nombre de gravures et de
cartes geographiques.
Paris: Hachette. (New York: Christern. 2 vols. 12mo.)
Besides its numerous and valuable maps, it contains more than 300
remarkably well-executed and artistic woodcuts, which add very
much to its value and interest. The study of the French language
and literature has been too much neglected in our American
colleges and higher schools. Every person of liberal education ought
to read and speak the French language. We recommend this book
to the attention of teachers, parents, and all persons occupied with
the study of French, and also to intelligent tourists, to whom it will
prove an invaluable companion on a visit to La Belle France.
These tales are taken principally from the German and French, and
are unexceptional in matter.
Books Received.