Performance tuning and SQL - WordPress.com€¦ · Performance tuning and SQL Nexus Michelle...
Transcript of Performance tuning and SQL - WordPress.com€¦ · Performance tuning and SQL Nexus Michelle...
Performance tuning and SQL Nexus
Michelle Gutzait [email protected]
Blog: http://michelle-gutzait.spaces.live.com/default.aspx
The big boss
The developers
The junior developers
The analysts
He who
thinks he’s
the big boss
The users
“My” DB server
What I would like EVERYONE to THINK I do !
A DBA
Fast +
So that I can REALLY BE…
Unknown
Defined
My SP is
timing out !!
The report
is slow
This
update
timeouts
The job is
taking too
long
This query
is the
deadlock
victim
Server is too slow Something is broken
Application crashes Weird behavior
Timeouts
Top down Bottom up
TOP DOWN is the best
approach.
Also for:
Capacity Planning
Periodical performance reviews
And (probably) more…
Windows Performance Monitor
SQL Server Profiler &
SQL Traces
ReadTrace
SQL Server Management Studio
Windows Management Instrumentation
(WMI)
Database Engine Tuning Advisor
DMVs and statistics
SQL Server 2008 Activity Monitor
SQL Server 2008 and R2 Ent tools…
PSSDiag
SQLDiag and PerfStats
Performance Analysis of Logs
(PAL)
3-rd party tool
I like it simple!!
Michelle’s… Performance Counters
There are too MANY things to check for!
Hardware
Operating System
SQL Server
(Network?)
Database applications
CPU
Memory
IO
SQL Server
(Network?)
Windows Performance Monitor
DMVs
SQL Server Profiler &
SQL Traces
Performance analysis
with
Windows Performance
Monitor…
OS/HARDWARE SQL SERVER
CPU analysis
Memory analysis
SQL Server Memory
IO and disk analysis
SQL Server behavior
Performance analysis
with
DMVs
Troubleshooting Performance Problems in SQL Server 2005
http://technet.microsoft.com/library/Cc966540#EFAA
SCRIPT REPOSITORIES
CPU analysis
Number of runnable tasks in each
scheduler
Which currently
cached batches or
procedures are using
the most CPU
SQL Server Memory analysis
Analysis of internal
memory pressure in
SQL Server
amount of memory consumed by
different SQL Server components
Latch waits - physical I/O waits
when a page is not available in
the buffer pool.
Currently pending I/O requests
IO and disk analysis
And much more…
WAIT STATISTICS
INDEX ANALYSIS
CACHE PLAN
TEMPDB USAGE
HEAVY T-SQL
BLOCKS/LOCKS
DEADLOCKS
ETC… ETC… ETC…
Michelle’s…
Index and T-SQL
Analysis with
DMVs
Performance analysis
with
SQL Profiler
Again…
T-SQL ANALYSIS
BLOCKS/LOCKS
DEADLOCKS
LOGINS/LOGOUTS
COMPILATIONS/RECOMP
ERRORS AND WARNINGS
CACHE MISSES
ETC… ETC… ETC…
How do YOU FEEL about the
EXCESSIVE INFO?
Fast +
PSSDIAG for SQL Server 7
and 2000
Installed with SQL Server
2005 and higher
COMPONENTS
SQL Traces
Performance Monitor
Others: Event Logs, Error
Logs, mini-dumps, msinfo32
COMPONENTS
Add your own
Example: pull data from DMVs
Features
Command line
Service
Scheduled
XML config file
One or all instances
Wait stats (DMVs)
SQLDiag
SQL Traces
Custom XML files
Blocks/locks (DMVs)
Integrated with SQLNexus
HTML REPORT
Cumulative query
performance data
Integrated with SQLNexus
Part of the RML
Utilities package
Multiple files
SSRS reporting
+ Extended reports
SQLDiag / PerStats
ReadTrace
Michelle Gutzait [email protected]
Blog: http://michelle-gutzait.spaces.live.com/default.aspx