microsoft ® sql server ™ 2000 performance matthew stephen sql server evangelist ...
TRANSCRIPT
![Page 1: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/1.jpg)
Microsoft® SQL Server™ 2000 Performance
Matthew StephenSQL Server Evangelisthttp://blogs.msdn.com/[email protected] Corporation
![Page 2: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/2.jpg)
What We Will Cover• Locking• Query Processor• Query Tuning• System Configuration• Performance Monitoring
![Page 3: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/3.jpg)
Session Prerequisites• This session assumes that you
understand the fundamentals of– Windows® 2000 Server– SQL Server 2000– System Monitor
Level 200-300Level 200-300
![Page 4: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/4.jpg)
Agenda
• Locking
• Query Processor
• Query Tuning
• System Configuration
• Performance Monitoring
![Page 5: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/5.jpg)
Lock ManagerWhat it does for you
• Acquires and Releases Locks
• Maintains compatibility Between Lock Modes
• Resolves Deadlocks
• Escalates Locks
• Uses 2 Locking Systems– Shared Data Locks– Internal latches for Internal data and index
concurrency
![Page 6: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/6.jpg)
Lock Isolation Levels
• Supports all 4 ANSI and ISO isolation levels– Serializable– Repeatable Read– Read Committed– Read Uncommitted
![Page 7: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/7.jpg)
LockingUser data lock types – Shared
• Acquired automatically when data is read
• Applies to Table, Page, Index Key or row.
• Many processes can hold a shared lock on the same data.
• Cannot be locked exclusively while in shared lock mode*
*Unless it is the same process that holds the shared lock
![Page 8: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/8.jpg)
LockingLock Granularity for user data
![Page 9: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/9.jpg)
LockingUser data lock types – Exclusive
• Automatically acquired when data is modified
• Only one process can hold at a time on any data.
• Held until the end of a Transaction
• All other lock requests by other processes will be refused.
• Can use Query hints to decide to read locked data.
![Page 10: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/10.jpg)
LockingUser data lock types – Update
• Hybrid of shared and exclusive
• Acquired when a search is required before and modification
• Allow others to still read while lock applied
• Needs an exclusive lock to modify data
• Data can have many shared but only one update
![Page 11: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/11.jpg)
LockingUser data lock types – Intent
• Not a real lock mode just a qualifier e.g.Intent Update lock
• Qualifier to modes already discussed
![Page 12: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/12.jpg)
LockingUser data lock types – Special
• 3 special modes– Schema Stability – used when queries are
modified, prevents scheme modification locks.– Scheme Modification – used when table structures
are being modified– Bulk update – used when the BULK INSERT or
BCP command are used.
![Page 13: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/13.jpg)
LockingViewing lock information
• Use the sp_lock stored procedure
• Shows current and waiting locks
Spid Dbib Objid IndId Type Resource Mode Status
54 pubs 19723 2 TAB IS GRANT
58 pubs 19755 1 PAG 1:88 IX GRANT
52 Pubs 0 0 DB S GRANT
![Page 14: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/14.jpg)
LockingViewing lock information - Type
Abbr Resource Internal
Code
Description / Example
DB Database 2
TAB Table 5 Table id 261775902
EXT Extent 8 File/ page number 1:96
PAG Page 6 File/ page number 1:104
KEY Key 7 Hashed value ac0001a10a00
AC Row 9 File/page/slot number 1:151:4
APP Application 10 Hash of the app name MYpr8dea
![Page 15: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/15.jpg)
LockingViewing lock information - ModeAbbreviation Mode Internal code
S Shared 4
X Exclusive 6
U Update 5
IS Intent shared 7
IU Intent update 8
IX Intent exclusive 9
SIX Shared with intent exclusive 11
Sch-S Schema stability 2
Sch-M Schema modification 3
BU Bulk update 13
![Page 16: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/16.jpg)
Locking Lock Overhead
• Lock Overhead– Each lock – 32 bytes– Each Process holding lock – 32 bytes– Each Process waiting for lock – 32 bytes
![Page 17: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/17.jpg)
Agenda
• Locking
• Query Processor
• Query Tuning
• System Configuration
• Performance Monitoring
![Page 18: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/18.jpg)
Query Processor Query Compilation
![Page 19: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/19.jpg)
Query Processor Query Optimization
![Page 20: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/20.jpg)
Query Processor How the Optimizer Works• Query Analysis
• Index Selection
• Join Selection– Nested iteration– Hashing– Merging
![Page 21: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/21.jpg)
Query Processor Cost and cache plan
![Page 22: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/22.jpg)
Query ProcessorCompilation and execution flow
![Page 23: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/23.jpg)
Agenda
• Locking
• Query Processor
• Query Tuning
• System Configuration
• Performance Monitoring
![Page 24: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/24.jpg)
Query TuningTuning – When to Start
• Start at the Beginning• Consider performance before you even
write your first line of code• Be sure that you've set up a good
database structure• Create what appear to be useful indexes• Make sure all analysis is done with a
representative workload
![Page 25: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/25.jpg)
Query Tuning Application and Database Design
• Provides Biggest Performance Gains
• Normalize
• Evaluate Your Critical Transactions
• Keep Table Row Lengths and Key Lengths Compact
• Create Useful Indexes
• Benchmark, Prototype and Test
![Page 26: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/26.jpg)
SQL ServerSQL Server
SQL ProfilerSQL ProfilerIndex Tuning Index Tuning
WizardWizard
Tuni
ng
Tuni
ng
Rec
omm
enda
tions
Rec
omm
enda
tions
Real-Tim
e
Real-Tim
e
Queries
Queries
(Filtered)(Filtered)WorkloadWorkload
Query tuningIndex Creation and Tuning
![Page 27: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/27.jpg)
Query PerformanceGraphical Execution Plan
![Page 28: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/28.jpg)
Query Tuning Monitoring Query Performance
• STATISTICS – Input/Output – Logical Reads– Physical Reads– Read Ahead Reads– Scan Count
• STATISTICS - Timings
• SHOWPLAN– Showplan_Text, Showplan_All, Graphical
Showplan
![Page 29: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/29.jpg)
Query Tuning Query Hints
• Query hints should be used for special cases—not as standard operating procedure
• Hint Types:– Join Hints– Index Hints– Lock Hints– Processing Hints
![Page 30: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/30.jpg)
Query Tuning Blocking and Deadlocks – How to Resolve Them• Keep transactions as short as possible
• Never add a pause within a transaction for user input
• When you process a result set, process all rows as quickly as possible
• For browsing applications, consider using cursors with optimistic concurrency control
![Page 31: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/31.jpg)
Query Tuning Deadlocks – How to Resolve Them
• To prevent cycle deadlocks, make all processes access resources in a consistent order.
• Reduce the transaction isolation level if it's suitable for the application.
• To prevent conversion deadlocks, explicitly serialize access to a resource.
![Page 32: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/32.jpg)
Gather information about the application’s behavior Use SQL Profiler
Analyze the information Query Analyzer Index Tuning Wizard
Apply Changes Index Tuning Wizard Enterprise Manager
Query tuningPerformance Tuning
• A step-by-step approach
![Page 33: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/33.jpg)
Agenda
• Locking
• Query Processor
• Query Tuning
• System Configuration
• Performance Monitoring
![Page 34: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/34.jpg)
System Configuration Resource Allocation and System File Location
• Ensure that Maximize Data Throughput for Network Applications is selected
• Do not locate SQL Server files on same drive as PAGEFILE.sys
![Page 35: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/35.jpg)
System Configuration Configuring SQL Resources
• Sp_configure– EXEC sp_configure
• RECONFIGURE– With override
• Enterprise Manager
![Page 36: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/36.jpg)
System Configuration Configuring SQL Resources
• Min Server Memory and Max Server Memory
• Set Working Set Size• Minimum Query
Memory
![Page 37: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/37.jpg)
System Configuration Configuring SQL Resources
• Scheduling– Lightweight Pooling– Affinity mask– Priority boost– Max Worker Threads
• Disk I/O Options
![Page 38: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/38.jpg)
System Configuration Configuring SQL Resources • Query Processing Options
– Min Memory Per Query– Query Wait– Index Create Memory– Query Governor Cost Limit– Max Degree of Parallelism
![Page 39: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/39.jpg)
System Configuration Configuring SQL Resources• Database Options
– Read Only– Single User– Autoclose– Autoshrink– Auto Create Statistics– Auto Update Statistics
![Page 40: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/40.jpg)
System Configuration Configuring SQL Resources
• Buffer Manager– “Pintable” Option– Monitoring Performance
• SQLPERF(WAITSTATS)• SQLPERF(LRUSTATS)
![Page 41: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/41.jpg)
Agenda
• Locking
• Query Processor
• Query Tuning
• System Configuration
• Performance Monitoring
![Page 42: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/42.jpg)
Performance Monitoring How to Use SQL Profiler
• Graphical tool to monitor and collect server events
• Step through problem queries to find the cause of the problem
• Identify poorly-performing queries• Capture the series of SQL statements that
lead to a problem• Use the saved traces to replicate problems on
a test server where they can be diagnosed
![Page 43: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/43.jpg)
Performance MonitoringHow to Use SQL Profiler
• Debug T-SQL or stored procedures• Monitor the performance of SQL Server
to tune workloads• Capture deadlocking scenarios• Playback events captured
![Page 44: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/44.jpg)
Performance Monitoring SQL Profiler • Event Categories
• Data Columns
• Filters
![Page 45: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/45.jpg)
Performance MonitoringSystem Stored Procedures
• SQL Trace– sp_trace_create– sp_trace_setevent– sp_trace_setfilter– sp_trace_setstatus– sp_trace_generateevent
• SQLDIAG
![Page 46: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/46.jpg)
Performance Monitoring Using System Monitor
• Monitors Entire System Performance
• System Counters
• SQL Counters
![Page 47: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/47.jpg)
Performance Monitoring System Monitor• View data simultaneously from any number of
computers• View and change charts to reflect current
activity, and show counter values that are updated at a user-defined frequency
• Export data from charts, logs, alert logs, and reports to spreadsheet or database applications for further manipulation and printing
• Add system alerts that list an event in the alert log and can notify you by reverting to the Alert view or issuing a network alert
![Page 48: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/48.jpg)
Performance Monitoring System Monitor• Run a predefined application the first time or
every time a counter value goes over or under a user-defined value
• Create log files that contain data about various objects from different computers
• Append to one file selected sections from other existing log files to form a long-term archive
• View current-activity reports, or create reports from existing log files
• Save individual chart, alert, log, or report settings, or the entire workspace setup for reuse when needed
![Page 49: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/49.jpg)
Performance Monitoring System Monitor - System Counters
• System:– Context Switches/sec
• Processor: – %Processor Time– %Privileged Time– %User Time– Processor Queue Length
![Page 50: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/50.jpg)
Performance Monitoring System Monitor - System Counters
• SQL Server: Memory Manager:– Total Server Memory(KB)
• Process: – Working Set Counter For SQL Server
Instance
• SQL Server Buffer Manager:– Buffer Cache Hit Ratio
![Page 51: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/51.jpg)
Performance Monitoring System Monitor - System Counters
• Memory: – Pages/sec
• SQLServer: Databases– Transactions/sec
• PhysicalDisk:– Disk Transfers/sec
![Page 52: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/52.jpg)
What can Performance Monitoring do?
• Some typical bottlenecks– What are some of the typical problem areas in
application?• Cache management• Query plan reuse• Recompilation• Transaction management e.g. concurrency• Resource utilization
• Doesn’t replace need for good app design
![Page 53: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/53.jpg)
Waits & Queues• Complementary information
– Together, explains app performance– Most are familiar with queues ( ½ the story)– Both are essential for problem determination
• Queues– Perfmon counters - measure resource utilization– Queues indicate unfulfilled resource requests
• SQL Waits– Waits from an Application or User connection
perspective
![Page 54: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/54.jpg)
Waits
• SQL waits– Application sends SQL queries
• SQL Server in turn issues resource requests– Translates to subsystem IO, memory, CPU– E.g. acquire locks, read | write data pages, sorts
• 50+ wait types for SQL2000• Anytime a user connection waits for results, SQL
sets a wait type
![Page 55: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/55.jpg)
Queues• PERFMON counters provide a view
of system performance from a resource standpoint
• Queues measure resource utilization– Requests that cannot be immediately
provided are queued– Key Perfmon counters
• Physical Disk (IO)• SQL Buffer Cache• CPU
![Page 56: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/56.jpg)
Wait types 1
• If a thread is not currently executing, a wait type or state is set in sysprocesses
• Sysprocesses contains– Lastwaittype– Waitype– Waittime
• Limitation: Transience of sysprocesses, spid history
![Page 57: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/57.jpg)
Wait types 2• DBCC sqlperf(waitstats,[clear])
– Cumulative waittypes & waittimes– Limitation: relevance types, what you can control?
![Page 58: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/58.jpg)
Track_waitstats stored proc• captures SQL waitstats from DBCC
SQLPERF • ranks wait types in descending order based
on percentage of total waits– identifies greatest opportunites for
performance improvement
• Can be graphed to see how waits vary over a workload
• Limitation: long durations can “hide” or smooth out waits
![Page 59: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/59.jpg)
Track_waitstats code (1 of 2)CREATE proc track_waitstats (@num_samples int=10,@delaynum int=1,@delaytype nvarchar(10)='minutes')as-- T. Davidson-- This stored procedure is provided "AS IS" with no warranties, and confers no rights. -- Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm-- @num_samples is the number of times to capture waitstats, default is 10 times. default delay interval is 1 minute-- delaynum is the delay interval. delaytype specifies whether the delay interval is minutes or seconds-- create waitstats table if it doesn't exist, otherwise truncateset nocount onif not exists (select 1 from sysobjects where name = 'waitstats')
create table waitstats ([wait type] varchar(80), requests numeric(20,1),[wait time] numeric (20,1),[signal wait time] numeric(20,1),now datetime default getdate())
else truncate table waitstatsdbcc sqlperf (waitstats,clear) -- clear out waitstatsdeclare @i int,@delay varchar(8),@dt varchar(3), @now datetime, @totalwait numeric(20,1)
,@endtime datetime,@begintime datetime,@hr int, @min int, @sec int
select @i = 1select @dt = case lower(@delaytype)
when 'minutes' then 'm'when 'minute' then 'm'when 'min' then 'm'when 'mm' then 'm'when 'mi' then 'm'when 'm' then 'm'when 'seconds' then 's'when 'second' then 's'when 'sec' then 's'when 'ss' then 's'when 's' then 's'else @delaytype
endif @dt not in ('s','m')begin
print 'please supply delay type e.g. seconds or minutes'return
end
![Page 60: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/60.jpg)
Track_waitstats code (2 of 2)
if @dt = 's'begin
select @sec = @delaynum % 60select @min = cast((@delaynum / 60) as int)select @hr = cast((@min / 60) as int)select @min = @min % 60
endif @dt = 'm'begin
select @sec = 0select @min = @delaynum % 60select @hr = cast((@delaynum / 60) as int)
endselect @delay= right('0'+ convert(varchar(2),@hr),2) + ':' +
+ right('0'+convert(varchar(2),@min),2) + ':' + + right('0'+convert(varchar(2),@sec),2)
if @hr > 23 or @min > 59 or @sec > 59begin
select 'hh:mm:ss delay time cannot > 23:59:59'select 'delay interval and type: ' + convert (varchar(10),@delaynum) + ',' + @delaytype + ' converts to ' + @delayreturn
endwhile (@i <= @num_samples)begin insert into waitstats ([wait type], requests, [wait time],[signal wait time])
exec ('dbcc sqlperf(waitstats)')select @i = @i + 1waitfor delay @delay
End--- create waitstats reportexecute get_waitstats
![Page 61: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/61.jpg)
Get_waitstats codeCREATE proc get_waitstatsas-- This stored procedure is provided "AS IS" with no warranties, and confers no rights. -- Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm---- this proc will create waitstats report listing wait types by percentage-- can be run when track_waitstats is executingset nocount on
declare @now datetime, @totalwait numeric(20,1),@endtime datetime,@begintime datetime,@hr int, @min int, @sec int
select @now=max(now),@begintime=min(now),@endtime=max(now)from waitstats where [wait type] = 'Total'
--- subtract waitfor, sleep, and resource_queue from Totalselect @totalwait = sum([wait time]) + 1 from waitstats where [wait type] not in ('WAITFOR','SLEEP','RESOURCE_QUEUE', 'Total', '***total***') and now = @now
-- insert adjusted totals, rank by percentage descendingdelete waitstats where [wait type] = '***total***' and now = @nowinsert into waitstats select '***total***',0,@totalwait,@totalwait,@now
select [wait type],[wait time],percentage=cast (100*[wait time]/@totalwait as numeric(20,1))from waitstats where [wait type] not in ('WAITFOR','SLEEP','RESOURCE_QUEUE','Total')and now = @noworder by percentage desc
![Page 62: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/62.jpg)
Track_waitstats Sample output
![Page 63: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/63.jpg)
Correlating Waits and Queues
• Waits should be correlated with Queues– Look beyond the symptom– Symptom can mask the problem– Identifies the specific resource constraint along
with the associated wait types– Actual problem could be app, SQL, or DB design,
rather than resource limitations
• Helpful to know performance profile when things are good– Now performance is bad - What changed?
![Page 64: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/64.jpg)
SQL 2000 Waits & Queues * SQL Server Magazine Jan 2004
![Page 65: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/65.jpg)
Correlating Waits & Queues: IO or Memory Pressure?
Waits Queues ExplanationIO_Completion
Async_IO_Completion
PageIOLatch_x
PageLatch_x
1. SQL Buffer Mgr–Avg Page Life Expectancy (seconds)–Checkpoint pages/sec–Lazywrites/sec
2. Physical Disk–Avg disk sec/read–Avg disk sec/write–Disk queues
Waits indicate IO issue
High Avg disk seconds indicates IO issue
HOWEVER Low average page life indicates memory pressure e.g. cache flushing
![Page 66: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/66.jpg)
Correlating Waits & Queues – IO or DB Design?
Waits Queues Explanation1. IO_Completion
2. Async_IO_Completion
3. Writelog
1. SQL Buffer Mgr–Avg Page Life Expectancy (seconds)–Checkpoint pages/sec–Lazywrites/sec
2. Physical Disk–Avg disk sec/read–Avg disk sec/write–Disk queues
1. If Profiler shows:
– Scan started
2. If Showplan shows
– Table scans– Clustered
index range scans
– Nonclustered index range scans
– Sorts
![Page 67: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/67.jpg)
Other sources of information
• Virtual tables• Undocumented
DBCC options
![Page 68: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/68.jpg)
File Statistics
• Dbcc showfilestats
• Select NumberReads, NumberWrites, BytesRead, BytesWritten, IoStallMS from ::fn_virtualfilestats
![Page 69: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/69.jpg)
Virtual System Tables• ::Fn_virtualfilestats (dbid, [fileId | -1])
– Provides breakdown of IO by file– Look for IostallMS– compare to Physical Disk reads/writes
• Indentifies SQL component of IO
• Syscacheobjects– Contains compiled objects e.g. query plans
• Sysprocesses– Contains each SQL thread & wait types
• Syslocks
![Page 70: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/70.jpg)
Stored procedures• Query plans are in syscacheobjects
– Execution plan (N)• User context, variable values, etc.
– Compiled plan (1)• Access strategy - single serial or parallel compiled plan
• Sp_procinfo– Displays stored proc info
• Parameters• Plan re-use (usecounts)• Startup• Owner
![Page 71: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/71.jpg)
Real memory issues• 32-bit SQL Server
– Virtual memory is limited to 2GB unless using /3GB, then it’s 3GB
• sorting, query plans, user connections, locks, utility buffers compete for virtual memory
• Thrashing (or memory pressure) in real memory means discarding plans & small sorts
– Affects index creation, joins, repeated optimization
– AWE (virtual memory above real)• Data and index pages• AWE map/unmap to access pages in virtual memory
• 64-bit SQL Server– Flat memory model so no limits to proc cache, no AWE
memory mapping
![Page 72: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/72.jpg)
What is in memory?
• Dbcc memobjlist (lists objects in real memory)
• Dbcc memorystatus
![Page 73: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/73.jpg)
Syscacheobjects & Re-use
![Page 74: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/74.jpg)
EventSubClass: Reason for recompilation
1 Schema, bindings or permissions changed between compile or execute.
2 Statistics changed.
3 Object not found at compile time, deferred check at run-time.
4 Set option changed in batch.
5 Temp table schema, binding or permission changed.
6 Remote rowset schema, binding or permission changed.
![Page 75: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/75.jpg)
Uses of CPU resourcesSorts Distincts, order by,
group byCompare to index & IX overhead
Joins Worktables, temp tables
Query plans indicate joins,types
Lack of plan re-use
SQL Compiles – SQL Recompiles
syscacheobjects usecounts
Look at parameterization
Recompilation SQL Recompiles/sec
Compare to batch requests
Manages IO Profiler Scans, memory pressure, DB design
Index utilization?
Page Life high enough?
UMS – context switching
Dbcc sqlperf(umsstats)
Look for BIG differences. Match big jobs with CPUs
![Page 76: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/76.jpg)
When does more memory help?
• Additional memory may help if…..– SQL Buffer Mgr:Page Life Expectancy is low
• Average time in seconds a page stays in cache
– SQL Server Memory Mgr: Memory Grants Pending is high
• SQL won’t execute a query if there isn’t enough memory for it
• If after adding, Page Life Expectancy is higher, more memory helps performance
![Page 77: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/77.jpg)
Concurrency: Helpful Lock scripts
• Sp_blockinfo – lists locking chainDBCC traceon (3605,3604)dbcc lock(StallReportThreshold, 200) –
Dumps all locks greater than 200 ms to SQL errorlog
![Page 78: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/78.jpg)
Design Issues• There are design considerations resulting from the
Waits and Queues methodology.
Observation Application issue Possible remedies
High IO waits 1. Database design
2. Memory Pressure
1. Bad query plans resulting from improper indexing.
2. Add correct indexes to minimize IO.
3. Add more memory
High CPU Utilization 1. Memory pressure
2. Plan re-use
3. Recompilation
4. Parameterization
1. Check for correct plan re-use, parameterization, re-compilation , see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/sql_queryrecompilation.asp
High Blocking / Low concurrency
1. Transaction management
1. Redo transaction management
2. use correct transaction isolation levels
![Page 79: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/79.jpg)
Summation
• Application performance all about waits and queues– Workloads may vary, shifting waits &
queues
• System performance is all about identifying (& resolving) bottlenecks, maximizing system capabilities– Figure out the problem, if it ain’t
broke….
![Page 80: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/80.jpg)
DB Files and Placement I• Ideally all database data files (filegroups) and log files
should be on separate devices, including TempDB• The same is true for SAN storage• SAN Sector alignment must be a multiple of 8KB (size of
SQL Sever data page) .– 64Kb boundary for best performance.– Some useful SAN configuration information can be found in
this articlehttp://www.microsoft.com/sql/techinfo/administration/2000/rosetta.asp
• To test storage (SAN or directly attached storage) IO throughput use: SQLIO Disk Subsystem Benchmark Tool (free to SQL users)– http://www.microsoft.com/downloads/details.aspx?FamilyId
=9A8B005B-84E4-4F24-8D65-CB53442D9E19&displaylang=en
![Page 81: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/81.jpg)
DB Files and Placement II
• For maximum IO throughput there should be as many data files as there are processors
• Start off with a sufficient number of files (minimum 3). Avoid adding files at a later time
• Avoid automatic growth of data files so as not to lose proportional fill• Keep all files at the same size
From Books Online:
As data is written to the filegroup, Microsoft® SQL Server™ writes an amount proportional to the free space in the file to each file within the filegroup, rather than writing all the data to the first file until full and then writing to the next file.
As soon as all the files in a filegroup are full, SQL Server automatically expands one file at a time in a round-robin fashion to accommodate more data (provided that the database is set to grow automatically).
![Page 82: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/82.jpg)
Performance Monitoring• SQL Server has hundreds of counters that can be monitored and
recorded using Performance (System) Monitor. This requires no additional, specialised or third party software.
• SAP will use some of these counters for its own reports.• SELECT * FROM :: fn_virtualfilestats(-1, -1)
– IoStallMS / NumberReads< 5ms good, <10 ms fair, < 20 ms poor
– More information on this command from:Miscellaneous SQL Server Performance Tuning Tips http://www.sql-server-performance.com/misc_tips.asp
• dbcc sqlperf (waitstats)– WRITELOG (Wait time / requests)
< 5 ms good, <10ms fair– PAGEIOLATCH_SH (Wait time / requests)
< 15 ms good• Windows perfmance counters
– Disk queue length – can be very misleading on SAN equipment where a permanently high figure may be reported without any performance issue.
– Average disk transfer times– For SQL Server counters and other useful Windows counters see
Microsoft SQL Server 2000 RDBMS Performance Tuning Guide for Data Warehousinghttp://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/rdbmspft.mspx
![Page 83: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/83.jpg)
Performance Monitoring
• DBCC INDEXDEFRAG– An online operation for index
defragmenting. Effects of fragmentation are minimal on a SAN with lots of spindles.
Microsoft SQL Server 2000 RDBMS Performance Tuning Guide for Data Warehousinghttp://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/rdbmspft.mspxHOW TO: Troubleshoot Application Performance with SQL Serverhttp://support.microsoft.com/?id=224587
![Page 84: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/84.jpg)
Performance Monitoring
Books Online - Distribution Statistics :
All indexes have distribution statistics that describe the selectivity and distribution of the key values in the index.
The distribution statistics are used to estimate how efficient an index would be in retrieving data associated with a key value or range specified in the query.
Distribution statistics may also be maintained for unindexed columns. These can be defined manually using the CREATE STATISTICS statement or created automatically by the query optimizer.
Distribution Statistics
CautionSELECT statements may, from time to time, cause the automatic update of statistics, depending on how much a table has changed since the statistics were last updated.This will have the effect of making the statement take a lot longer to return for no readily apparent reason. Whilst the automatic update of statistics can be disabled this shouldn’t be necessary except in the most extreme situations. Were this deemed necessary statistics would need to be updated as part of a scheduled process.
![Page 85: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/85.jpg)
Demonstration
![Page 86: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/86.jpg)
Conclusions• SQL Server 2000 is a high performance
enterprise class database.• Performance Monitoring is a tool that should
be used throughout the application life cycle– Identify bottlenecks in
• application
• database
• resource utilization
– Exploit all resources• CPU
• I/O
• Network
• Data (concurrency vs. consistency)
![Page 87: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/87.jpg)
References• “Inside SQL Server 2000” by Kalen
Delaney• “SQL Server 2000 Performance Tuning”
by Whalen, Garcia, DeLuca, Thompson• “SQL Server 2000 Recompilation” at
http://msdn.microsoft.com• “SQL Server 2000 Performance Tuning
with Waits & Queues” SQL Magazine (January 2004)
![Page 88: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/88.jpg)
For More Information• “Inside SQL Server 2000”, Microsoft Press, 2000., or:
http://mspress.microsoft.com/books/4297.htm• “Microsoft® SQL Server™ 2000 Resource Kit”,
http://www.mspress.microsoft.com/PROD/BOOKS/4939.HTM• “Microsoft® SQL Server™ 2000 Reference Library “,
http://mspress.microsoft.com/prod/books/5001.htm• “Microsoft® SQL Server™ 2000 Administrator's Companion”,
http://mspress.microsoft.com/books/4519.htm• “Microsoft® BackOffice® 4.5 Resource Kit ”, Microsoft Press, 1999, or:
http://mspress.microsoft.com/prod/books/2483.htm
• Refer to the TechNet website at www.microsoft.com/technet/• IT Professionals User Groups in your area
– www.microsoft.com/technet/usergroup/default.asp
![Page 89: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/89.jpg)
• Administering a Microsoft SQL Server 2000 Database– Course # 2072—Five days—Instructor-led
– Available: through MS CTECs in your area
• Querying Microsoft SQL Server 2000 with Transact-SQL– Course # 2071—Two days—Instructor-led or eLearning
– Available: through MS CTECs in your area
TrainingTraining Resources for ITProfessionals
![Page 90: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/90.jpg)
Where Can I Get TechNet?
• Visit TechNet Online atwww.microsoft.com/technet
• Register for the TechNet Flash www.microsoft.com/technet/register/flash.asp
• Join the TechNet Online forum at www.microsoft.com/technet/discuss
• Become an TechNet Subscriber at technetbuynow.one.microsoft.com
• Attend More TechNet Events
![Page 91: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/91.jpg)
Become A Microsoft Certified Systems Engineer• What Is MCSE?
– Premier certification for professionals who analyze the business requirements and design and implement the infrastructure for business solutions based on the Microsoft server software.
• How do I become a Windows 2000 MCSE?– Pass 4 Core Exams– Pass 1 Design Exam– Pass 2 Electives from a comprehensive list
• Where Do I Get More Information?– For more information about certification requirements,
exams, and training options, visit www.microsoft.com/mcp
![Page 92: Microsoft ® SQL Server ™ 2000 Performance Matthew Stephen SQL Server Evangelist Mattstep@microsoft.com Microsoft Corporation](https://reader036.vdocuments.mx/reader036/viewer/2022062715/56649d975503460f94a812a9/html5/thumbnails/92.jpg)