lock escalation count since when

baberamin
baberamin used Ask the Experts™
on
Hi,

I have a question that below query show the lock escalation count. That count is since when? Is it
- since database created?
- since database server restarted?


SELECT
db_name(dios.database_id) AS database_name,
object_name(dios.object_id, dios.database_id) AS
object_name,
i.name as index_name,
dios.partition_number,
dios.index_lock_promotion_attempt_count,
dios.index_lock_promotion_count,
(cast(dios.index_lock_promotion_count AS real) /
dios.index_lock_promotion_attempt_count) AS
percent_success
FROM
sys.dm_db_index_operational_stats(db_id(), null,
null, null) dios
INNER JOIN
sys.indexes i
on dios.object_id = i.object_id
and dios.index_id = i.index_id
WHERE dios.index_lock_promotion_count > 0
ORDER BY index_lock_promotion_count desc;
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
PortletPaulEE Topic Advisor
Most Valuable Expert 2014
Awarded 2013

Commented:
sys.dm_db_index_operational_stats (Transact-SQL)
How the Counters in the Metadata Cache Are Reset
and the cumulative counts may reflect activity since the instance of SQL Server was last started.

Author

Commented:
can you please explain in few words for me?
EE Topic Advisor
Most Valuable Expert 2014
Awarded 2013
Commented:
That count is since database server restarted.

Nothing more to explain. The documentation is quite clear.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial