Presentation is loading. Please wait.

Presentation is loading. Please wait.

Interpreting DMV’s & practical uses Jannie Muller mullerjannie.wordpress.com.

Similar presentations


Presentation on theme: "Interpreting DMV’s & practical uses Jannie Muller mullerjannie.wordpress.com."— Presentation transcript:

1 Interpreting DMV’s & practical uses Jannie Muller mullerjannie.wordpress.com

2 wellington.sqlpass.org

3 Making sense of – Dynamic Manage Views And other practical DBA stuff!

4 Troubleshooting Timeline “Where do we start ?!” wellington.sqlpass.org

5 “sys.configurations VS. sp_configure.” o sys.configurations o Degree of parallelism o Server memory o Query memory o Full text crawl bandwith o CPU affinity o Fillfactor

6 “sys.configurations VS. sp_configure.” Hard affinity. No affinity.

7 “sys.dm_os_sys_info and sys.dm_os_memory_Clerks” o sys.dm_os_sys_info o Number of CPUs(cpu count) o Hyperthreading ratio o System Memory o Restart date o Affinity (scheduler count) o sys.dm_os_memory_clerks o NUMA Nodes

8 “sys.dm_os_buffer_descriptors” o sys.dm_os_buffer_descriptors o Row per item in the buffer pool. o Page types.

9 Troubleshooting Timeline “Where do we start ?!” wellington.sqlpass.org

10 Sp_who2 o sp_who2 ‘active’ o Active requests o Blocking o NUMA o Server start date o Long running processes o Log, mirror, jobs,broker o Gauge workload o Checkpoints o Status o Runnable\waiting o Fulltext o System threads

11 select 100.*sum(signal_wait_time_ms)/sum(wait_time_ms), 100.*sum(wait_time_ms -signal_wait_time_ms)/sum(wait_time_ms) from sys.dm_os_wait_stats -- resource & CPU waits. “sys.dm_os_wait_stats and sys.dm_os_waiting_tasks” o sys.dm_os_wait_stats o Historical o Overall wait types o Filter on types o Resource waits o Signal (CPU waits) o sys.dm_os_waiting_tasks o Current o Who is blocking o What is it blocking on o Activity o Bottlenecks

12 select 100.*sum(signal_wait_time_ms)/sum(wait_time_ms), 100.*sum(wait_time_ms -signal_wait_time_ms)/sum(wait_time_ms) from sys.dm_os_wait_stats -- resource & CPU waits. “sys.os_wait_stats and sys.dm_waiting_tasks” o sys.dm_os_wait_stats o Historical o Overall wait types o Filter on types o Resource waits o Signal (CPU waits) o sys.dm_os_waiting_tasks o Current o Who is blocking o What is it blocking on o Activity o Bottlenecks

13 “sys.dm_exec_requests and sys.dm_exec_query_stats” o sys.dm_exec_query_stats o Historical o Logical \ Physical reads(IO) o Total worker time (CPU) o Execution Count o Text handle. o sys.dm_exec_requests o Current o Who is executing o What is it blocking on o Activity o Text Handle o read \ writes \ cpu o Percentage complete o Schedulers o Wait types

14 “sys.exec_requests and sys.dm_exec_query_stats” o sys.dm_exec_query_stats o Historical o Logical \ Physical reads(IO) o Total worker time (CPU) o Execution Count o Text handle. o sys.dm_exec_requests o Current o Who is executing o What is it blocking on o Activity o Text Handle

15 “sys.dm_exec_query_stats” When it works, it works well…sys.dm_exec_query_stats..that issue on a Friday afternoon just before Beer’o clock.

16 Butterfly effect… Table details: 200mb, 600k rows. @ 200 executions per second, it makes a difference.

17 “sp_recompile” - The solution

18 Troubleshooting Timeline “Where do we start ?!” wellington.sqlpass.org

19 “sys.dm_io_virtual_file_stats” SQL VS. Excel o Cumulative o read \ Write waits. o Data Vs. log file.

20 o sys.dm_db_index_usage_stats sys.dm_db_index_usage_stats o Historical o Seek o Scan o Lookup o Update o Last used date o sys.dm_db_index_operational_stats o Waits or latches o Range or singleton lookup o sys.dm_db_index_physical_stats o Fragmentation o Size “You can use sys.dm_db_index_operational_stats to track the length of time that users must wait to read or write to a table, index, or partition, and identify the tables or indexes that are encountering significant I/O activity or hot spots.” - BOL “sys.dm_db_index_usage_stats, sys.dm_db_index_operational_stats, sys.dm_db_index_physical_stats”

21 o sys.dm_db_index_usage_stats o Historical o Seek o Scan o Lookup o Update o Last used date o sys.dm_db_index_operational_stats o Waits or latches o Range or singleton lookup o sys.dm_db_index_physical_stats o Fragmentation o Size

22 “sys.dm_db_index_usage_stats, sys.dm_db_index_operational_stats, sys.dm_db_index_physical_stats” o sys.dm_db_index_usage_stats o Historical o Seek o Scan o Lookup o Update o Last used date o sys.dm_db_index_operational_stats o Waits or latches o Range or singleton lookup o sys.dm_db_index_physical_stats o Fragmentation o Size

23 “sys.dm_db_index_usage_stats, sys.dm_db_index_operational_stats, sys.dm_db_index_physical_stats” o sys.dm_db_index_usage_stats o Historical o Seek o Scan o Lookup o Update o Last used date o sys.dm_db_index_operational_stats o Waits or latches o Range or singleton lookup o sys.dm_db_index_physical_stats o Fragmentation o Size “The value for avg_fragmentation_in_percent should be as close to zero as possible for maximum performance. However, values from 0 percent through 10 percent may be acceptable. All methods of reducing fragmentation, such as rebuilding, reorganizing, or re- creating, can be used to reduce these values. “ - BOL

24 Troubleshooting Timeline “Where do we start ?!”

25 Thanks! Questions? Please complete an evaluation form for this session …and thanks again to our awesome sponsors!


Download ppt "Interpreting DMV’s & practical uses Jannie Muller mullerjannie.wordpress.com."

Similar presentations


Ads by Google