Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Look up keyword or section
Like this

Table Of Contents

CHAPTER 1 Introduction to Performance and Tuning
CHAPTER 2 Introduction to the Basics
Good performance
Response time
Good performance 3
Designing for performance
Tuning performance
Tuning levels
Application layer
Database layer
Adaptive Server layer
Devices layer
Network layer
Hardware layer
Configuration parameters
Identifying system limits
Varying logical page sizes
Number of columns and column size
Number of logins
Performance implications for limits
Setting tuning goals
Analyzing performance
Normal Forms
Special Considerations
CHAPTER 3 Networks and Performance
Potential performance problems
Potential performance problems 19
Basic questions on network performance
Techniques summary
Using sp_sysmon while changing network configuration
How Adaptive Server uses the network
Managing Network Listeners
Network Listeners on UNIX
Managing listeners with sp_listener
Using the remaining parameter
Determining the status of listeners
Starting new listeners
Stopping listeners
Suspending listeners
Resume suspended listeners
Changing network packet sizes
Large versus default packet sizes for user connections
Number of packets is important
Evaluation tools with Adaptive Server
Evaluation tools outside of Adaptive Server
Server-based techniques for reducing network traffic
Impact of other server activities
Single user versus multiple users
Improving network performance
Isolate heavy network users
Set tcp no delay on TCP networks
Configure multiple network listeners
CHAPTER 4 Using Engines and CPUs
Background concepts
Background concepts 35
How Adaptive Server processes client requests
Client task implementation
Single-CPU process model
Scheduling engines to the CPU
Scheduling tasks to the engine
Execution task scheduling
Adaptive Server SMP process model
Scheduling engines to CPUs
Scheduling Adaptive Server tasks to engines
Multiple network engines
Task priorities and run queues
Processing scenario
4Performing disk I/O
Asynchronous log service
Understanding the user log cache (ULC) architecture
When to use ALS
Using the ALS
Housekeeper task improves CPU utilization
Side effects of the housekeeper task
Configuring the housekeeper task
Measuring CPU usage
Single-CPU machines
Determining when to configure additional engines
Taking engines offline
Enabling engine-to-CPU affinity
Multiprocessor application design guidelines
CHAPTER 5 Distributing Engine Resources
Algorithm for successfully distributing engine resources
Algorithm for successfully distributing engine resources 59
Algorithm guidelines
Environment analysis and planning
I/O-intensive and CPU-intensive execution objects
Performing benchmark tests
Setting goals
Results analysis and tuning
Monitoring the environment over time
Manage preferred access to resources
Types of execution classes
Predefined execution classes
User-Defined execution classes
Execution class attributes
Base priority
Time slice
Task-to-engine affinity
Setting execution class attributes
Assigning execution classes
Engine groups and establishing task-to-engine affinity
How execution class bindings affect scheduling
Setting attributes for a session only
Getting information
Rules for determining precedence and scope
Multiple execution objects and ECs
Precedence rule
Resolving a precedence conflict
Examples: determining precedence
Example scenario using precedence rules
Execution characteristics
Considerations for Engine Resource Distribution
Client applications: OLTP and DSS
Adaptive Server logins: high-priority users
Stored procedures: “hot spots”
CHAPTER 6 Controlling Physical Data Placement
Object placement can improve performance
Object placement can improve performance 89
Symptoms of poor object placement
Underlying problems
Using sp_sysmon while changing data placement
Terminology and concepts
Guidelines for improving I/O performance
Spreading data across disks to avoid I/O contention
Improving insert performance with partitions
Restrictions on partitioned tables
Partition-related configuration parameters
How Adaptive Server distributes partitions on devices
Space planning for partitioned tables
Read-only tables
Read-mostly tables
Tables with random data modification
Commands for partitioning tables
alter table...partition syntax
alter table...unpartition Syntax
Changing the number of partitions
Distributing data evenly across partitions
Using parallel bcp to copy data into partitions
Getting information about partitions
Using bcp to correct partition balance
Checking data distribution on devices with sp_helpsegment
Adding disks when devices are full
Adding disks when devices are nearly full
Maintenance issues and partitioned tables
Regular maintenance checks for partitioned tables
CHAPTER 7 Database Design
Basic design
Physical database design for Adaptive Server
Logical Page Sizes
Levels of normalization
Benefits of normalization
First Normal Form
Second Normal Form
Third Normal Form
Denormalizing for performance
Denormalization input
Collapsing tables
Splitting tables
Managing denormalized data
Using triggers
Using application logic
Batch reconciliation
How OAM pages and allocation pages manage object storage
Page allocation keeps an object’s pages together
sysindexes table and data access
Space overheads
Number of columns and size
Number of rows per data page
Maximum numbers
Heaps of data: tables without clustered indexes
Lock schemes and differences between heaps
Select operations on heaps
Inserting data into an allpages-locked heap table
Inserting data into a data-only-locked heap table
Deleting data from a heap table
Updating data on a heap table
How Adaptive Server performs I/O for heap operations
Sequential prefetch, or large I/O
Caches and object bindings
Heaps, I/O, and cache strategies
LRU replacement strategy
MRU replacement strategy
Select operations and caching
Data modification and caching
Asynchronous prefetch and I/O on heap tables
Heaps: pros and cons
Maintaining heaps
Transaction log: a special heap table
CHAPTER 9 Setting Space Management Properties
Reducing index maintenance
Reducing index maintenance 183
Advantages of using fillfactor
Disadvantages of using fillfactor
Setting fillfactor values
fillfactor examples
Use of the sorted_data and fillfactor options
Reducing row forwarding
Default, minimum, and maximum values for exp_row_size
Specifying an expected row size with create table
Adding or changing an expected row size
Setting a default expected row size server-wide
Displaying the expected row size for a table
Choosing an expected row size for a table
Conversion of max_rows_per_page to exp_row_size
Monitoring and managing tables that use expected row size
Leaving space for forwarded rows and inserts
Extent allocation operations and reservepagegap
Specifying a reserve page gap with create table
Specifying a reserve page gap with create index
Changing reservepagegap
reservepagegap examples
Choosing a value for reservepagegap
Monitoring reservepagegap settings
reservepagegap and sorted_data options to create index
Using max_rows_per_page on allpages-locked tables
Reducing lock contention
Indexes and max_rows_per_page
select into and max_rows_per_page
Applying max_rows_per_page to existing data
CHAPTER 10 Memory Use and Performance
How memory affects performance
How memory affects performance 205
How much memory to configure
Dynamic reconfiguration
Dynamic memory allocation
How memory is allocated
Caches in Adaptive Server
CAche sizes and buffer pools
Procedure cache
Getting information about the procedure cache size
Procedure cache sizing
Estimating stored procedure size
Data cache
Default cache at installation time
Page aging in data cache
Effect of data cache on retrievals
Effect of data modifications on the cache
Data cache performance
Testing data cache performance
Configuring the data cache to improve performance
Commands to configure named data caches
Tuning named caches
Cache configuration goals
Gather data, plan, and then implement
Evaluating cache needs
Large I/O and performance
Reducing spinlock contention with cache partitions
Cache replacement strategies and policies
Named data cache recommendations
Basing data pool sizes on query plans and I/O
Configuring buffer wash size
Overhead of pool configuration and binding objects
Maintaining data cache performance for large I/O
Diagnosing excessive I/O Counts
Using sp_sysmon to check large I/O performance
Speed of recovery
Tuning the recovery interval
Effects of the housekeeper wash task on recovery time
Auditing and performance
Sizing the audit queue
Auditing performance guidelines
Text and images pages
CHAPTER 11 Determining Sizes of Tables and Indexes
Why object sizes are important to query tuning
Why object sizes are important to query tuning 247
Tools for determining the sizes of tables and indexes
Effects of data modifications on object sizes
Using optdiag to display object sizes
Advantages of optdiag
Disadvantages of optdiag
Using sp_spaceused to display object size
Advantages of sp_spaceused
Disadvantages of sp_spaceused
The disadvantages of sp_spaceused are:
Using sp_estspace to estimate object size
Advantages of sp_estspace
Disadvantages of sp_estspace
Using formulas to estimate object size
Factors that can affect storage size
Storage sizes for datatypes
Tables and indexes used in the formulas
Calculating table and clustered index sizes for allpages-locked tables
Step 8: Calculate the number of leaf pages in the index
Calculating the sizes of data-only-locked tables
Other factors affecting object size
Using average sizes for variable fields
Very small rows
LOB pages
Advantages of using formulas to estimate object size
Disadvantages of using formulas to estimate object size
CHAPTER 12 How Indexes Work
Types of indexes
Index pages
Intermediate level
Index Size
Clustered indexes on allpages-locked tables
Clustered indexes and select operations
Clustered indexes and insert operations
Page splitting on full data pages
See “Exceptions to page splitting” on page 280
Page splitting on index pages
Performance impacts of page splitting
Overflow pages
Clustered indexes and delete operations
Nonclustered indexes
Leaf pages revisited
Nonclustered index structure
Nonclustered indexes and select operations
Nonclustered index performance
Nonclustered indexes and insert operations
Nonclustered indexes and delete operations
Clustered indexes on data-only-locked tables
Index covering
Covering matching index scans
Covering nonmatching index scans
Indexes and caching
Using separate caches for data and index pages
Index trips through the cache
CHAPTER 13 Indexing for Performance
How indexes affect performance
How indexes affect performance 297
Detecting indexing problems
Symptoms of poor indexing
Fixing corrupted indexes
Repairing the system table index
Index limits and requirements
Choosing indexes
Index keys and logical keys
Guidelines for clustered indexes
Choosing clustered indexes
Candidates for nonclustered indexes
Index Selection
Other indexing guidelines
Choosing nonclustered indexes
Choosing composite indexes
Key order and performance in composite indexes
Advantages and disadvantages of composite indexes
The disadvantages of composite indexes are:
Techniques for choosing indexes
Choosing an index for a range query
Adding a point query with different indexing requirements
Index and statistics maintenance
Dropping indexes that hurt performance
Choosing space management properties for indexes
Additional indexing tips
Creating artificial columns
Keeping index entries short and avoiding overhead
Dropping and rebuilding indexes
Configure enough sort buffers
Create the clustered index first
Configure large buffer pools
CHAPTER 14 Cursors and Performance
Set-oriented versus row-oriented programming
Resources required at each stage
Memory use and execute cursors
Cursor modes
Index use and requirements for cursors
Allpages-locked tables
Data-only-locked tables
Comparing performance with and without cursors
Sample stored procedure without a cursor
Sample stored procedure with a cursor
Cursor versus noncursor performance comparison
Locking with read-only cursors
Isolation levels and cursors
Partitioned heap tables and cursors
Optimizing tips for cursors
Optimizing for cursor selects using a cursor
Using union instead of or clauses or in lists
Declaring the cursor’s intent
Specifying column names in the for update clause
Using set cursor rows
Keeping cursors open across commits and rollbacks
Opening multiple cursors on a single connection
CHAPTER 15 Maintenance Activities and Performance
Running reorg on tables and indexes
Running reorg on tables and indexes 343
Creating and maintaining indexes
Configuring Adaptive Server to speed sorting
Dumping the database after creating an index
Creating an index on sorted data
Maintaining index and column statistics
Rebuilding indexes
Creating or altering a database
Backup and recovery
Local backups
Remote backups
Online backups
Using thresholds to prevent running out of log space
Minimizing recovery time
Recovery order
Bulk copy
Parallel bulk copy
Batches and bulk copy
Slow bulk copy
Improving bulk copy performance
Replacing the data in a large table
Adding large amounts of data to a table
Using partitions and multiple bulk copy processes
Impacts on other users
Database consistency checker
Using dbcc tune (cleanup)
Using dbcc tune on spinlocks
When not to use this command
Determining the space available for maintenance activities
Overview of space requirements
Tools for checking space usage and space available
Estimating the effects of space management properties
If there is not enough space
CHAPTER 16 Tuning Asynchronous Prefetch
How asynchronous prefetch improves performance
How asynchronous prefetch improves performance 363
Improving query performance by prefetching pages
Prefetching control mechanisms in a multiuser environment
Look-ahead set during recovery
Look-ahead set during sequential scans
Look-ahead set during nonclustered index access
Look-ahead set during dbcc checks
Look-ahead set minimum and maximum sizes
When prefetch is automatically disabled
Flooding pools
I/O system overloads
Unnecessary reads
Tuning Goals for asynchronous prefetch
Commands for configuration
Other Adaptive Server performance features
Large I/O
Fetch-and-discard (MRU) scans
Parallel scans and large I/Os
Special settings for asynchronous prefetch limits
Setting limits for recovery
Setting limits for dbcc
Maintenance activities for high prefetch performance
Eliminating kinks in heap tables
Eliminating kinks in clustered index tables
Eliminating kinks in nonclustered indexes
Performance monitoring and asynchronous prefetch
CHAPTER 17 tempdb Performance Issues
How management of tempdb affects performance
How management of tempdb affects performance 381
Main solution areas for tempdb performance
Types and uses of temporary tables
Truly temporary tables
Regular user tables
Initial allocation of tempdb
Sizing the tempdb
Placing tempdb
Dropping the master device from tempdb segments
Using multiple disks for parallel query performance
Binding tempdb to its own cache
Commands for cache binding
Temporary tables and locking
Minimizing logging in tempdb
With select into
By using shorter rows
Optimizing temporary tables
Creating indexes on temporary tables
Creating nested procedures with temporary tables
Breaking tempdb uses into multiple procedures
0 of .
Results for:
No results containing your search query
P. 1
Database Fund

Database Fund

Ratings: (0)|Views: 6|Likes:
Published by Sindhuja Gunturi

More info:

Published by: Sindhuja Gunturi on Mar 11, 2012
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





You're Reading a Free Preview
Pages 9 to 115 are not shown in this preview.
You're Reading a Free Preview
Pages 124 to 136 are not shown in this preview.
You're Reading a Free Preview
Pages 151 to 172 are not shown in this preview.
You're Reading a Free Preview
Pages 181 to 432 are not shown in this preview.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->