availability and performance for tier1...
TRANSCRIPT
Assaf Fraenkel Senior Architect
(MCA+MCM SQL 2008)
MCS Israel
Availability and
Performance for
Tier1 applications
Agenda:
Introduce the new SQL Server High Availability and Disaster Recovery solution (AlwaysOn) in SQL Server 2012.
Column Based Store - New way to boost performance
Extended Events - Briefing
Key Takeaway(s):
Get the overview of these features
According to your specific needs - deep dive into these features
Agenda and Takeaways
REQUIRED 9s & DATA PROTECTION
Greater flexibility and
availability with SQL
Server AlwaysOn
Maximized hardware
resources
Support for Windows
Server Core to reduce
planned downtime
A A A
Mission Critical Confidence
BLAZING-FAST PERFORMANCE
Column-based query
accelerator for dramatic
performance gains
Faster performance for
FILESTREAM,
spatial & FTS
ORGANIZATIONAL COMPLIANCE & PEACE OF MIND
User-defined server roles
for better separation of
duties & Audit support
across editions
SharePoint & Active
Directory integration for
secure BI data
Simplified application
testing with Distributed
Replay and streamlined
troubleshooting with
Extended Events
Always
On
Mission Critical High Availability
Reuse existing investment
SAN versus DAS environments
Multi-Database Failover
Multiple Secondaries
Active Secondaries
Integrated HA Management
Mission Critical High Availability AlwaysOn Solution in SQL 2012
Providing
Database
Availability
AlwaysOn Availability Group
Multi-database failover
Total of 4 secondaries
2 synchronous
secondaries
1 automatic failover pair
Synchronous and
asynchronous
Built in compression and
encryption
Automatic and manual
failover
Flexible failover policy
Automatic Page Repair
Application failover using
virtual name
Configuration Wizard
Dashboard
System Center Integration
Rich diagnostic
infrastructure
Replication
publisher/subscriber
failover
Supported with Contained
Database, File Stream, File
Table, Service Broker
Readable Secondary
Backup from Secondary
Mission Critical High Availability
AlwaysOn Availability Group AlwaysOn provides the flexibility
of different HA configurations
Synchronous
Data Movement
Asynchcronous
Data Movement
Shared Storage, regional
and geo secondaries
A
A
A
A
A
Direct attached storage local,
regional and geo target
A A
AlwaysOn Availability Group Application Failover with Availability Group Listener
2 DB 2 DB
Parameter Sample: -server TechListener1;-catalog HRDB
ServerA ServerB ServerC
Availability Groups Listener allow applications to failover seamlessly to any
secondary; reconnecting through Virtual Network Name
2 DB
TechAG1
Primary Secondary
TechListener1
Application retry during failover
Primary Secondary Secondary
Connect to new primary
once failover is complete
and the listener is online
AlwaysOn Availability Group Active Secondary : Backup and Log Shipping on secondary
Backups can be done on
any replica of a database
Backups on primary
replica still works
Log backups done on all
replicas form a single
log chain
Database Recovery
Advisor makes
restores simple
R/W workload
Primary
Backups
Secondary
Log Shipping
Secondary
Backups
DRP
Deploying AlwaysOn Availability Group
Demo
Columnstore Indexes
Is This Your Data Warehouse Experience?
Wait ing…
Columnstore Indexes
Wait ing…
Value Proposition of Columnstore Indexes
Faster, interactive query response time
Easier data exploration
Better decisions
Reduced physical DB design effort
Fewer indexes
Reduced need for summary aggregates and
indexed views
May eliminate need for OLAP cubes
Transparent to the application
Ability to handle larger workload on given hardware
ColumnStore
Indexes
in Action
Demo
Memory Management
Management is automatic
Columnstore is persisted on disk
Columns (segments) fetched into memory as needed
Columnstore segments flow between disk and memory
SELECT C2, SUM(C4)
FROM T
GROUP BY C2;
T.C2 T.C4
T.C2 T.C4
T.C2
T.C2
T.C2 T.C1
T.C1
T.C1
T.C1
T.C1 T.C3
T.C3
T.C3
T.C3
T.C3
T.C4
T.C4
T.C4
Advanced query processing technology
Batch mode execution of some
operations
Processes column data in
batches
Groups of batch operations
in query plan
Compact data representation
Highly efficient algorithms
Better parallelism
How Does Batch Mode Speed Up Queries?
Columnstore index scan
can produce batches or
rows
Batch-enabled
operators get batches
Non-batch operators
get rows
Query optimizer decides
Processing Data
Lis
t o
f q
ualify
ing
ro
ws
Column vectors
Batch object
Limitations When Using ColumnStore Indexes
Creating columnstore index
Only on common business data types
Maintain table: limited operations
Can read but not update the data
Can switch partitions in and out
Processing queries
All read-only T-SQL queries run
Some queries are accelerated more than others
Yes int, real, string, money, datetime, decimal <= 18 digits
No decimal > 18 digits, binary, varbinary, CLR, (n)varchar(max),
varbinary (max), uniqueidentifier, datetimeoffset with
precision > 2
Multiple DISTINCT aggregates issue & workaround
• Table Spool if query has 2 or more DISTINCT aggregates • Spool takes time to write • Spool write is single threaded • Reads of spool in plan are single threaded, in row mode • Workaround:
form each DISTINCT agg in separate subquery Join results on grouping keys
SQL Server 2012 runs queries with 1 DISTINCT agg and 1 or more non-distinct aggs in batch mode without any spool!
Columnstore indexes can enable
phenomenal performance gains
Batch mode processing is an
essential ingredient for speedup
Some adjustments to schema
and loading processes may be
necessary
Some queries can benefit from
tuning
Columnstore indexes are not a
magic bullet
Summary
Diagnostic tracing using Extended Events
Why do we need Extended Events? New Problems for
Diagnostics
We have
more
complex
systems
Need to
reduce
performance
impact of
diagnostics
Desire for
more
detailed
information
Need to
find
unexpected
interactions
Unique Value of Extended Events
Scalability Bigger machines, more work, more
events - no problem.
Events are dynamic Collect additional data on any event
Perform an action when an event happens
Cross process event tracking Track relationship between different
tasks/threads/processes
Integrates with Windows eventing Expose tracing information to Windows
tools such as Xperf
Coordinate with trace data from other ETW Providers
Key Advancements in SQL Server 2012
Graphic User Interface! Both Advanced & Wizard based event session creation.
Tabular view of event data.
Filter, Sort, Group & Aggregate right in the user interface.
Export event data to Table, CSV or XEL.
Managed APIs New Object Model:
Create, Modify and Drop event sessions.
Start & Stop event sessions.
Read event data from file or directly from a running event session.
New Events & Updated Target Names More than twice as many events (over 600).
Now includes all the same data as SQL Trace.
Asynchro-what? - event_file, historgram, event_counter
Extended Events
Demo
We learned:
Introduce the new SQL Server High Availability and Disaster Recovery solution (AlwaysOn) in SQL Server 2012.
Column Based Store - New way to boost performance
Extended Events - Briefing
Key Takeaway(s):
According to your specific needs - deep dive into these features
Start to Implement
Summary and Takeaways
Thank
You!
© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista, and other product names are or may be registered trademarks and/or trademarks
in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this
presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft
cannot guarantee the accuracy of any information provided after the date of this presentation.
MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
לצפייה במצגות :האירוע היכנסווהרצאות
http://www.microsoft
.com/israel/benext