This document discusses using Dynamic Management Views (DMVs) and Dynamic Management Functions (DMFs) in SQL Server to monitor and troubleshoot database performance issues. It begins with an introduction to DMVs/DMFs and their benefits. It then provides examples of DMVs and DMFs to monitor various aspects of the SQL Server architecture like execution plans, memory usage, I/O activity, and index usage. The document demonstrates some DMV/DMF queries and discusses how they can help identify issues like long-running queries, memory pressure, and missing indexes. It also provides additional DMV/DMF examples for common performance troubleshooting scenarios.
Ajuste (tuning) del rendimiento de SQL Server 2008Eduardo Castro
En el siguiente webcast http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032438450&Culture=es-AR analizamos las herramientas de desempeño de SQL Server 2008 y cómo utilizarlas.
Saludos,
Ing. Eduardo Castro Martínez, PhD – Microsoft SQL Server MVP
http://mswindowscr.org
http://comunidadwindows.org
Costa Rica
Technorati Tags: SQL Server
LiveJournal Tags: SQL Server
del.icio.us Tags: SQL Server
http://ecastrom.blogspot.com
http://ecastrom.wordpress.com
http://ecastrom.spaces.live.com
http://universosql.blogspot.com
http://todosobresql.blogspot.com
http://todosobresqlserver.wordpress.com
http://mswindowscr.org/blogs/sql/default.aspx
http://citicr.org/blogs/noticias/default.aspx
http://sqlserverpedia.blogspot.com/
Ajuste (tuning) del rendimiento de SQL Server 2008Eduardo Castro
En el siguiente webcast http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032438450&Culture=es-AR analizamos las herramientas de desempeño de SQL Server 2008 y cómo utilizarlas.
Saludos,
Ing. Eduardo Castro Martínez, PhD – Microsoft SQL Server MVP
http://mswindowscr.org
http://comunidadwindows.org
Costa Rica
Technorati Tags: SQL Server
LiveJournal Tags: SQL Server
del.icio.us Tags: SQL Server
http://ecastrom.blogspot.com
http://ecastrom.wordpress.com
http://ecastrom.spaces.live.com
http://universosql.blogspot.com
http://todosobresql.blogspot.com
http://todosobresqlserver.wordpress.com
http://mswindowscr.org/blogs/sql/default.aspx
http://citicr.org/blogs/noticias/default.aspx
http://sqlserverpedia.blogspot.com/
Cognitive Discourse Analysis: Introduction (LANCOM 1) Jelec Anna
Discourse analysis is based on the assumption that context is fundamental for our understanding of text. The social context (such as education or politics), the thing accomplished by the text (e.g., legislation, teaching), the participants and their various communicative, social and professional roles, the relations between them, the setting (time, location) and other social or interactional properties of the communicative event are all relevant to understanding the discourse behind it (van Dijk 2000). Cognitive discourse analysis uses what we know about cognitive processing to understand and create discourse.
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsZohar Elkayam
Oracle Week 2017 slides.
Agenda:
Basics: How and What To Tune?
Using the Automatic Workload Repository (AWR)
Using AWR-Based Tools: ASH, ADDM
Real-Time Database Operation Monitoring (12c)
Identifying Problem SQL Statements
Using SQL Performance Analyzer
Tuning Memory (SGA and PGA)
Parallel Execution and Compression
Oracle Database 12c Performance New Features
Les comparto la presentación utilizada en la charla sobre optimización de desempeño de SQL Server.
Saludos,
Eduardo Castro Martinez
http://ecastrom.blogspot.com
http://comunidadwindows.org
Cognitive Discourse Analysis: Introduction (LANCOM 1) Jelec Anna
Discourse analysis is based on the assumption that context is fundamental for our understanding of text. The social context (such as education or politics), the thing accomplished by the text (e.g., legislation, teaching), the participants and their various communicative, social and professional roles, the relations between them, the setting (time, location) and other social or interactional properties of the communicative event are all relevant to understanding the discourse behind it (van Dijk 2000). Cognitive discourse analysis uses what we know about cognitive processing to understand and create discourse.
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsZohar Elkayam
Oracle Week 2017 slides.
Agenda:
Basics: How and What To Tune?
Using the Automatic Workload Repository (AWR)
Using AWR-Based Tools: ASH, ADDM
Real-Time Database Operation Monitoring (12c)
Identifying Problem SQL Statements
Using SQL Performance Analyzer
Tuning Memory (SGA and PGA)
Parallel Execution and Compression
Oracle Database 12c Performance New Features
Les comparto la presentación utilizada en la charla sobre optimización de desempeño de SQL Server.
Saludos,
Eduardo Castro Martinez
http://ecastrom.blogspot.com
http://comunidadwindows.org
In this practical and script-focused session, Presenter William Assaf discusses best practices regarding SQL Server administration, maintenance, optimizations and monitoring using Dynamic Management Views. DMV's are essential tools for the SQL administrator, but have a wide range of applications by developers, network engineers and DBAs.
Presenter: Dean Richards of Confio Software
If you're a developer or DBA, this presentation will outline a method for determining the best execution plan for a query every time by utilizing SQL Diagramming techniques.
Whether you're a beginner or expert, this approach will save you countless hours tuning a query.
You Will Learn:
* SQL Tuning Methodology
* Response Time Tuning Practices
* How to use SQL Diagramming techniques to tune SQL statements
* How to read executions plans
This presentation was prepared for a Webcast where John Yerhot, Engine Yard US Support Lead, and Chris Kelly, Technical Evangelist at New Relic discussed how you can scale and improve the performance of your Ruby web apps. They shared detailed guidance on issues like:
Caching strategies
Slow database queries
Background processing
Profiling Ruby applications
Picking the right Ruby web server
Sharding data
Attendees will learn how to:
Gain visibility on site performance
Improve scalability and uptime
Find and fix key bottlenecks
See the on-demand replay:
http://pages.engineyard.com/6TipsforImprovingRubyApplicationPerformance.html
Investigate SQL Server Memory Like Sherlock HolmesRichard Douglas
Memory is one part of the holy trinity of resources consumed by SQL Server, the others being CPU and disk. Most people know how to look at disk latency and throughput and then take remedial measures to fix those issues. But what about memory issues?
In this session, you will learn how SQL Server uses memory and various caches, how to gauge memory pressure, and how to address the significant problems it can cause.
You will leave with a much clearer understanding of how to monitor and manage memory consumption within SQL Server using native Dynamic Management Objects.
SQL Server 2022 Programmability & PerformanceGianluca Hotz
SQL Server 2022 has introduced many new features across all areas of the product. In this session, we will focus on the news regarding programmability and performance improvements.
Performance Analysis: new tools and concepts from the cloudBrendan Gregg
Talk delivered at SCaLE10x, Los Angeles 2012.
Cloud Computing introduces new challenges for performance
analysis, for both customers and operators of the cloud. Apart from
monitoring a scaling environment, issues within a system can be
complicated when tenants are competing for the same resources, and are
invisible to each other. Other factors include rapidly changing
production code and wildly unpredictable traffic surges. For
performance analysis in the Joyent public cloud, we use a variety of
tools including Dynamic Tracing, which allows us to create custom
tools and metrics and to explore new concepts. In this presentation
I'll discuss a collection of these tools and the metrics that they
measure. While these are DTrace-based, the focus of the talk is on
which metrics are proving useful for analyzing real cloud issues.
SQL Server 2016: Just a Few of Our DBA's Favorite ThingsHostway|HOSTING
Join Rodney Landrum, Senior DBA Consultant for Ntirety, a division of HOSTING, as he demonstrates his favorite new features of the latest Microsoft SQL Server 2016 Service Pack 1.
During the accompanying webinar and slides, Rodney will touch on the following:
• A demo of his favorite new features in SQL Server 2016 and SP1 including:
o Query Store
o Database Cloning
o Dynamic Data Masking
o Create or Alter
• A review of Enterprise features that are now available in standard edition
• New information in Dynamic Management Views and SQL Error Log that will make your DBAs job easier.
Performance & Scalability Improvements in PerforcePerforce
Recent releases of Perforce include improvements targeting performance and scalability. The edge/commit server architecture and lockless reads are two such improvements. This presentation will detail the effect of these improvements as measured in concurrency simulations and production deployments. Some of the server internals implemented to achieve these gains in performance and scalability will also be discussed.
How SQL Server was ported to Linux? The presentation goes through some of the concepts: SQLOS, Drawbridge and Containers. It shows the role of SQLPAL as a platform abstraction layer.
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
20 Comprehensive Checklist of Designing and Developing a WebsitePixlogix Infotech
Dive into the world of Website Designing and Developing with Pixlogix! Looking to create a stunning online presence? Look no further! Our comprehensive checklist covers everything you need to know to craft a website that stands out. From user-friendly design to seamless functionality, we've got you covered. Don't miss out on this invaluable resource! Check out our checklist now at Pixlogix and start your journey towards a captivating online presence today.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIVladimir Iglovikov, Ph.D.
Presented by Vladimir Iglovikov:
- https://www.linkedin.com/in/iglovikov/
- https://x.com/viglovikov
- https://www.instagram.com/ternaus/
This presentation delves into the journey of Albumentations.ai, a highly successful open-source library for data augmentation.
Created out of a necessity for superior performance in Kaggle competitions, Albumentations has grown to become a widely used tool among data scientists and machine learning practitioners.
This case study covers various aspects, including:
People: The contributors and community that have supported Albumentations.
Metrics: The success indicators such as downloads, daily active users, GitHub stars, and financial contributions.
Challenges: The hurdles in monetizing open-source projects and measuring user engagement.
Development Practices: Best practices for creating, maintaining, and scaling open-source libraries, including code hygiene, CI/CD, and fast iteration.
Community Building: Strategies for making adoption easy, iterating quickly, and fostering a vibrant, engaged community.
Marketing: Both online and offline marketing tactics, focusing on real, impactful interactions and collaborations.
Mental Health: Maintaining balance and not feeling pressured by user demands.
Key insights include the importance of automation, making the adoption process seamless, and leveraging offline interactions for marketing. The presentation also emphasizes the need for continuous small improvements and building a friendly, inclusive community that contributes to the project's growth.
Vladimir Iglovikov brings his extensive experience as a Kaggle Grandmaster, ex-Staff ML Engineer at Lyft, sharing valuable lessons and practical advice for anyone looking to enhance the adoption of their open-source projects.
Explore more about Albumentations and join the community at:
GitHub: https://github.com/albumentations-team/albumentations
Website: https://albumentations.ai/
LinkedIn: https://www.linkedin.com/company/100504475
Twitter: https://x.com/albumentations
3. PREMIER FIELD ENGINEER
•
Suporte Global 24x7
•
Atendimento a contratos Premier Support
•
Especialista de produto
•
Tipos de Serviços
Resolução de problemas
Análise proativa de ambientes críticos
Workshops e Transferência de conhecimento
4. MOTIVAÇÃO
•
Objetivo
Utilizar DMV no dia a dia
•
Vantagens
Nova ferramenta disponível no SQL 2005
Revela detalhes sobre o funcionamento do servidor
Executa tarefas que não são possíveis no SQL 2000
7. TRABALHANDO COM DMV E DMF
•
Dynamic Management Objects
Schema: sys
Nome: dm_*
•
Exemplos:
SELECT * FROM sys.dm_exec_requests
SELECT * FROM sys.dm_exec_sessions
SELECT * FROM sys.dm_exec_connections
SELECT * FROM sys.dm_exec_sql_text(@h)
8. GRUPOS FUNCIONAIS
•
DMV/DMF estão organizados em categorias
Common Language Runtime (CLR)
Database Mirroring
Database
Execution
Indexes
I/O Operations
Query Notifications
Replication
Service Broker
SQL Server Operating System
Transaction
9. DEMO
•
Select * from sys.system_objects
Where name like ‘dm_%’
•
Books Online 2005
“Dynamic Management Objects”
“sys.dm_exec_requests”
10. ARQUITETURA DO SQL SERVER
•
Storage Engine
Infra-estrutura do SQL Server
Comunicação com o Sistema Operacional
Exemplos:
Gerenciamento de Threads
Gerenciamento de Memória
Gerenciamento de I/O
•
Relational Engine
Implementação da linguagem SQL
Conceito de índices e estatísticas
Exemplos:
Compilação
Otimização
Execução da query
25. DEMO
•
Cenário: 100% CPU
•
Select * from sys.dm_exec_connections
•
Select * from sys.dm_exec_sessions
•
Select * from sys.dm_exec_requests
•
Select * from sys.dm_exec_sql_text(@h)
•
Use substring
•
Select * from sys.dm_exec_requests
•
CROSS APPLY operator
•
Select * from sys.dm_exec_plan_handle(@h)
•
Save query plan to with sqlplan file extension
26. HISTÓRICO DE EXECUÇÃO
•
Após cada execução, essa DMV é atualizada
•
Colunas
sql_handle
plan_generation_num
plan_handle
last_execution
execution_count
total_worker_time
total_physical_read/write
total_logical_read/write
total_elapsed_time
31. DM_EXEC_QUERY_STATS
•
Algumas queries não aparecem
Extended Stored Procedures
.NET Stored Procedures
Comandos T-SQL (IF, WHILE, etc)
Queries triviais
•
Existem situações que removem parte das estatísticas
DBCC FREEPROCCACHE
Memory Pressure
32. DEMO
•
Cenário: I/O intensive
•
Verificar que não há problemas
•
SELECT * FROM sys.dm_exec_requests
•
Listar todas as queries de sys.dm_exec_query_stats
•
Identificar os consumidores de CPU
•
Identificar os responsáveis pelos physical read
•
Calcular a média de leituras físicas
•
Utilizar sql_handle e plan_handle
33. ÍNDICES
•
Falta de índices adequados para queries
sys.dm_db_missing_index_details
•
Utilização de Índices
sys.dm_db_index_usage_stats
35. ADICIONAIS
•
Server level
dm_exec_*
Execution of user code and associated connections
dm_os_*
low level system (server-wide) info such as memory, locking &
scheduling
dm_tran_*
Transactions & isolation
dm_io_*
Input/Output on network and disks
dm_db_*
Databases and database objects
•
GRUPO DE DMV’S
36. ADICIONAIS
•
Component level
dm_repl_*
Replication
dm_broker_*
SQL Service Broker
dm_fts_*
Full Text Search
dm_qn_*
Query Notifications
•
GRUPO DE DMV’S
37. ADICIONAIS
•
MEMÓRIA ALOCADA
•
Você pode usar o sys.dm_os_memory_clerks DMV como
exemplo a seguir para identificar quanta memória o SQL
Server aloca através do mecanismo do AWE.
•
Select
sum(awe_allocated_kb) / 1024 as [AWE allocated, Mb] from
sys.dm_os_memory_clerks
•
•
CENÁRIO DE PERFORMANCE
38. ADICIONAIS
•
Query plan ineficiente
•
A query sys.dm_exec_query_stats é um eficiente caminho
para determinar qual query está usando a maior CPU
cumulativa.
•
Select
•
highest_cpu_queries.plan_handle,
•
highest_cpu_queries.total_worker_time,
•
q.dbid, q.objectid, q.number, q.encrypted, q.[text]
•
from
•
(select top 50 qs.plan_handle, qs.total_worker_time
•
from sys.dm_exec_query_statssys.dm_exec_query_stats qs
•
order by qs.total_worker_time desc) as highest_cpu_queries
•
cross apply sys.dm_exec_sql_text(plan_handle) as q
•
order by highest_cpu_queries.total_worker_time desc
•
CENÁRIO DE PERFORMANCE
39. ADICIONAIS
•
Top CPUs procs & batches
Select top 50
•
sum(qs.total_worker_time) as total_cpu_time,
•
sum(qs.execution_count) as total_execution_count,
•
count(*) as '#_statements',
•
qt.dbid, qt.objectid, qs.sql_handle,
•
qt.[text] from sys.dm_exec_query_stats as qs
•
cross apply sys.dm_exec_sql_text (qs.sql_handle) as qt
•
group by qt.dbid,qt.objectid, qs.sql_handle,qt.[text]
•
order by sum(qs.total_worker_time) desc,qs.sql_handle
•
CENÁRIO DE PERFORMANCE
40. ADICIONAIS
•
CPU – O que está executando em paralelo?
•
Paralelismo é bom para DW, não para OLTP
Select r.session_id,
r.request_id,
max(isnull(exec_context_id, 0)) as number_of_workers,
r.sql_handle,
r.statement_start_offset,
r.statement_end_offset,
r.plan_handle
from sys.dm_exec_requestssys.dm_exec_requests r
join sys.dm_os_tasks t on r.session_id = t.session_id
join sys.dm_exec_sessions s on r.session_id = s.session_id
where s.is_user_process = 0x1
group by r.session_id, r.request_id, r.sql_handle, r.plan_handle,
r.statement_start_offset, r.statement_end_offset
having max(isnull(exec_context_id, 0)) > 0
•
CENÁRIO DE PERFORMANCE
41. ADICIONAIS
•
Pressão CPU : Recompilação
•
Select top 25
•
sql_text.text,
•
sql_handle,
•
plan_generation_num,
•
execution_count,
•
dbid,
•
objectid
•
from sys.dm_exec_query_statssys.dm_exec_query_stats a
•
Cross apply sys.dm_exec_sql_text(sql_handle) as sql_text
•
where plan_generation_num >1
•
order by plan_generation_num desc
•
CENÁRIO DE PERFORMANCE
42. ADICIONAIS
•
Memória: Top memory por objeto & índice
•
CENÁRIO DE PERFORMANCE
Select b.database_id
,p.object_id
,object_name(p.object_id) as objname
,p.index_id
,buffer_count=count(*)
from sys.allocation_units a,
sys.dm_os_buffer_descriptorssys.dm_os_buffer_descriptors b,
sys.partitions p
where a.allocation_unit_id =
b.allocation_unit_id
and a.container_id = p.hobt_id
group by b.database_id,p.object_id,
p.index_id
order by buffer_count desc
43. ADICIONAIS
•
Top IOs por statement
•
SELECT TOP 50
•
(qs.total_logical_reads + qs.total_logical_writes) /qs.execution_count
•
as [Avg IO],
•
substring (qt.text,qs.statement_start_offset/2, (case when
qs.statement_end_offset = -1
•
then len(convert(nvarchar(max), qt.text)) * 2
•
else qs.statement_end_offset end -qs.statement_start_offset)/2)
•
as query_text,
•
qt.dbid,
•
qt.objectid
•
FROM sys.dm_exec_query_statssys.dm_exec_query_stats qs
•
cross apply sys.dm_exec_sql_text (qs.sql_handle) as qt
•
ORDER BY
•
[Avg IO] DESC
•
CENÁRIO DE PERFORMANCE
44. ADICIONAIS
•
Visualizando a utilização dos índices das tabelas
•
Select so.name AS 'Table Name', si.name AS 'index Name',
si.type_desc AS 'Index Type', si.index_id AS 'Index ID',
us.user_seeks, us.user_scans, us.system_seeks, us.system_scans
FROM sys.dm_db_index_usage_statssys.dm_db_index_usage_stats us
INNER JOIN sys.objects so
ON us.object_id = so.object_id
INNER JOIN sys.indexes si
ON so.object_id = si.object_id
WHERE so.type = 'U'
•
CENÁRIO DE PERFORMANCE
45. ADICIONAIS
•
Visualizando Índices não atualmente utilizados
Select so.name AS 'Table Name', si.name AS 'index Name',
si.type_desc AS 'Index Type', si.index_id AS 'Index ID',
•
us.user_seeks, us.user_scans, us.system_seeks, us.system_scans,
us.user_lookups, us.system_lookups,us.user_updates,
•
us.system_updates
•
--other columns are available
•
FROM sys.dm_db_index_usage_statssys.dm_db_index_usage_stats us
•
INNER JOIN sys.objects so ON us.object_id = so.object_id
•
INNER JOIN sys.indexes si ON so.object_id = si.object_id
•
WHERE so.type = 'U' AND us.user_seeks = 0
•
AND us.user_scans = 0 AND us.system_seeks = 0
•
AND us.system_scans = 0
•
CENÁRIO DE PERFORMANCE
47. PRÓXIMAS
PALESTRAS
Palestra 1:
Palestra 2:
Palestra 3:
•
SUP304 Otimizando os Subsistemas
de Discos para o Microsoft Exchange
Server
30/11/2006 15:30 - 16:45
•
SUP305 Processo de Migração para
ISA Server 2006
30/11/2006 17:00 - 18:15
•
Ask the Experts
48. LINKS ÚTEIS
SQL Server 2005 System Views Online
http://download.microsoft.com/download/0/d/f/0df
e488e-a335-4480-8a8a-
b405e32f4368/SQL2005_Sys_Views.pdf
Troubleshooting Performance
Problems in SQL 2005
http://www.microsoft.com/technet/prodtechn
ol/sql/2005/tsprfprb.mspx
SQL Server 2005 Books Online
http://www.microsoft.com/technet/prodtechn
ol/sql/2005/downloads/books.mspx
Dynamic Management Views and
Functions
http://msdn2.microsoft.com/en-
us/library/ms188754.aspx