initial population of repo
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"id": "c5965ee1-0c12-4cea-a7a7-ae9638190683",
|
||||
"prefix": "dmvReadWriteIdx",
|
||||
"description": "index read vs write stats",
|
||||
"body": "--- Index Read/Write stats (all tables in current DB) ordered by Reads (Query 62) (Overall Index Usage - Reads)\r\nSELECT\ttblName = o.name\r\n\t\t,o.type\r\n\t ,i.name AS [IndexName]\r\n\t ,i.index_id\r\n\t ,user_seeks + user_scans + user_lookups AS [Reads]\r\n\t ,s.user_updates AS [Writes]\r\n\t ,i.type_desc AS [IndexType]\r\n\t ,i.fill_factor AS [FillFactor]\r\n\t ,i.has_filter\r\n\t ,i.filter_definition\r\n\t ,s.last_user_scan\r\n\t ,s.last_user_lookup\r\n\t ,s.last_user_seek\r\nFROM\tsys.dm_db_index_usage_stats AS s WITH (NOLOCK)\r\n\t\tINNER JOIN sys.indexes AS i WITH (NOLOCK) ON s.object_id = i.object_id\r\n\t\tINNER JOIN sys.objects o WITH (NOLOCK) ON s.object_id = o.object_id\r\nWHERE\to.type = 'U' -- user table\r\n\tAND i.index_id = s.index_id\r\n\tAND s.database_id = DB_ID()\r\n\t--AND o.name = 'tblRezeptZeile'\r\n\t--AND i.name = 'idxTblRezeptZeileUniProfilFK'\r\nORDER BY user_seeks + user_scans + user_lookups DESC -- Order by reads\r\n--ORDER BY s.user_updates DESC OPTION \t\t\t\t -- Order by writes\r\nOPTION\t(RECOMPILE);\r\n"
|
||||
}
|
||||
Reference in New Issue
Block a user