Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 1192

DMV in SQL Server is a catch-all term for Database Management Views [& Functions]. Technically they are all now DMOs (Database Management Objects) however the term DMV is still widely understood and accepted by most.

1 vote
Accepted

Is there a way to show index_advantage more friendly?

As Michael Green noted, this doesn't trivially convert into a percentage. This query looks at the top 25 "scores", based on this formula; but those scores aren't based some known maximum. If you look …
5 votes

What are the practical impacts of the sys.dm_exec_query_stats warning in the documentation?

I do not know how to apply the above warning in practice. That's because it is vague. There is a space at the end of the documentation page to leave feedback. That is pretty much the only way som …
Paul White's user avatar
  • 90.2k
6 votes
Accepted

Why is there a difference between these transaction DMVs in SQL Server 2008 R2?

Some of that may be because it would be inconvenient to go through a complete deprecation cycle each time a change in DMV behaviour occurs, but it's likely just an oversight in this case. …
Paul White's user avatar
  • 90.2k
1 vote
Accepted

DMV sys.dm_exec_procedure_stats sometimes returns weird (incorrect?) values ​in successive o...

Any discrepancy would imply an error in the way the procedure DMV aggregates the data. Assuming your code was error-free, anyway. Plan caching is a complex area, with many ways to do things wrong. …
Paul White's user avatar
  • 90.2k
10 votes
Accepted

Cursoring over sys.databases skips databases

sys.databases is a complex view. On SQL Server 2016 it is: CREATE VIEW sys.databases AS SELECT d.name, d.id AS database_id, r.indepid AS source_database_id, d.sid AS owner …
Paul White's user avatar
  • 90.2k
2 votes

What is the purpose of parent_plan_handle in sys.dm_exec_cached_plans?

parent_plan_handle is undocumented. There is no official purpose. It would not work for you here. I am attempting to prove whether the plan cache is caching statements individually within multiple st …
Paul White's user avatar
  • 90.2k
4 votes
Accepted

Finding the names of objects in the Resource database

In my instance, object id -706609674 is sys.fn_cdc_jobs. The resource database is just another database with files you can make a copy of and attach under a different name. The files are named mssqlsy …
Paul White's user avatar
  • 90.2k
2 votes
Accepted

Querying the sys.dm_db_log_info() function while reducing to the max

00000010:0001 50593792 253970 0 0 00000000:00000000:0000 (13 res clipped) NULL NULL NULL NULL 954204160 0 0 0 00000000:00000000:0000 Replace the single reference to the table variable with the DMV
Paul White's user avatar
  • 90.2k
10 votes
Accepted

Selecting from sys.dm_tran_locks takes 100+ ms

You should use APPLOCK_MODE and APPLOCK_TEST instead of scanning the locks DMV. … Background The sys.dm_tran_locks DMV itself employs the widely used streaming table-valued function (sTVF) interface, exposed via T-SQL using the internal-only OPENROWSET(TABLE ... syntax. …
Paul White's user avatar
  • 90.2k
3 votes

Calculating min/max values of a columnstore table with sys.column_store_segments

Even SQL Server doesn't use min_data_id or max_data_id directly when processing MIN or MAX aggregates, even when aggregate pushdown (SQL Server 2016 or later, Enterprise Edition or equivalent) is empl …
Paul White's user avatar
  • 90.2k
7 votes
Accepted

Improve the poor performance of the sys.dm_db_stats_properties DMV

This is a workaround, and what we would have done before the new DMV was provided. It's not ideal, and you should report the unexpectedly slow performance you see to Microsoft. …
Paul White's user avatar
  • 90.2k
10 votes

Running query against DMVs for Query Stats and Execution Plans joined to sys.databases

...why the huge performance hit from joining to sys.databases? And why is it inconsistent? There's nothing special about joining to sys.databases. The optimizer happens to choose a plan that is i …
Paul White's user avatar
  • 90.2k