SlideShare a Scribd company logo
@brisebois
@brisebois
@brisebois http://bit.ly/1gG3SLT
@brisebois http://bit.ly/1cReNGH
@brisebois
• It’s a full SQL server
• It’s resources aren’t shared
• You must maintain and
patch the server
• No High Availability
• You will probably need an
I.T professional to help you
manage the Virtual Machine
http://bit.ly/1cReNGH
SQL Server Enterprise Edition on a Medium
VM (2 CPU, 3.5GB RAM) Costs $20,364/ Year
@brisebois
• It’s highly available
• It’s data is redundant (3 Copies)
• It’s response times are
unpredictable
• It doesn’t support a high volume
of concurrent queries
• It can be federated (scaled out)
• It’s constantly updated by
Microsoft
• It’s maintained by Microsoft
http://bit.ly/1cReNGH
SQL Database 150GB
Cost $2,709.36 / Year
@brisebois http://bit.ly/NoF0jZ
@brisebois http://bit.ly/1eM05MB
@brisebois http://bit.ly/1iWxmb3
@brisebois http://bit.ly/1hsz7eU
Take Control! Use the Microsoft SQL Server
Data Tools
@brisebois http://bit.ly/1iwpdvw
Building Clustered Indexes on
Non-Primary Key Columns in
Windows Azure SQL Database
@brisebois http://bit.ly/1iwpdvw
Building Clustered Indexes on
Non-Primary Key Columns in
Windows Azure SQL Database
@brisebois http://bit.ly/1iwpdvw
Building Clustered Indexes on
Non-Primary Key Columns in
Windows Azure SQL Database
@brisebois http://bit.ly/1nyFgOd
Use IDs for lookup data and use GUIDs for data
that is susceptible to synchronization and to
public use.
@brisebois http://bit.ly/1iwpdvw
In a blog post “Uniqueidentifier and Clustered Indexes” the author points
out that the easiest and best approach to creating a Clustered Index is to
use a datetime2 column.
datetime2 has a resolution of 1/1000000 of a second
@brisebois http://bit.ly/Nopd4t
Creating NONCLUSTERED INDEXES
@brisebois http://bit.ly/Nopd4t
• If a CLUSTERED INDEX is present on
the table, then NONCLUSTERED
INDEXES will use its key instead of
the table ROW ID.
• To reduce the size consumed by the
NONCLUSTERED INDEXES it’s
imperative that the CLUSTERED INDEX
KEY is kept as narrow as possible.
@brisebois http://bit.ly/Nopd4t
• SQL Database can JOIN and
INTERSECT INDEXES in order to satisfy
a query without having to read data
directly from the table.
• Favor many narrow NONCLUSTERED
INDEXES
• Create Filtered INDEXES to create
highly selectivity
@brisebois http://bit.ly/Nopd4t
• Use Covering INDEXEs to reduce the
number of bookmark lookups required
to gather data that is not present in the
other INDEXES.
• Covering INDEXES can be used to
physically maintain the data in the
same order as is required by the
queries’ result sets reducing the need
for SORT operations.
@brisebois http://bit.ly/Nopd4t
• Covering INDEXES have an increased
maintenance cost, therefore you must
see if performance gain justifies the extra
maintenance cost.
• NONCLUSTERED INDEXES can
reduce blocking by having SQL
Database read from NONCLUSTERED
INDEX data pages instead of the actual
tables.
@brisebois http://bit.ly/1idgltT
Identify Missing Indexes in Your Windows
Azure SQL Database
@brisebois http://bit.ly/1qMrE0N
Don’t Forget About Index Maintenance on
Windows Azure SQL Database
• On SQL Server, when we identify 5% to
30% of average fragmentation we should
issue a REORGANIZE statement
• On SQL Database we can only use the
REBUILD WITH (ONLINE =
ON) statement
@brisebois http://bit.ly/1qMrE0N
Entity
Framework and TransactionScope
transactions are limited to 10 minutes
@brisebois http://bit.ly/1fTckv2
Identifying the Top 20 Slowest Queries
Being Executed Against a Windows Azure
SQL Database
@brisebois http://bit.ly/1kD3eDp
Does Your Data Really Belong in Your SQL
Database?
@brisebois http://bit.ly/1fTdHdg
Put Your SQL Database on a
Diet!
@brisebois
• It’s highly availability
• It’s data is redundant (3 copies)
• It’s constantly updated by
Microsoft
• It’s maintained by Microsoft
• Can use services like a CDN
• The load is dispersed over many
services
http://bit.ly/1cReNGH
SQL Database 10GB + 100GB Blob
+ 100GB Table = Cost $803.52 /Year
@brisebois http://bit.ly/1d7hhkP
@brisebois
• It’s highly availability
• It’s data is redundant (3 copies)
• It can handle + concurrent queries
that a 1 database
• It’s quite complex to backup
• It’s response time is unpredictable
• It’s constantly updated by
Microsoft
• It’s maintained by Microsoft
http://bit.ly/1cReNGH
SQL Database 5 * 10GB
Cost $2,757.24 /Year
@brisebois
• It has dedicated resources
• It’s response time is predictable
• It’s highly available
• It’s data is redundant (3 Copies)
• It’s maintained by Microsoft
• It can be sharded (scaled out)
• It’s constantly updated by
Microsoft
http://bit.ly/1cReNGH
SQL Database Premium P2 150GB
Cost $11,331 /Year (preview pricing)
@brisebois http://bit.ly/1nyrLOi
@brisebois http://bit.ly/PJm6GH
What Does it Cost to Backup a Windows Azure SQL Database?
@brisebois http://bit.ly/1id79FY
@brisebois
@brisebois http://bit.ly/1dhxu19
@brisebois http://bit.ly/1iW2XxL
@brisebois http://bit.ly/1gzhfB5
• Replace NewDatabaseName by the name
of the new Database
• Replace ServerName by the database
server name of the source Database
• Replace SourceDatabase by the name of
the source Database
@brisebois http://bit.ly/1lIDJAr
@brisebois http://bit.ly/1hsOmEx
@brisebois http://bit.ly/1hsOmEx
• 40501 – Retry to connect to SQL Database in intervals of 10 seconds until the resources are
available and your connection is established again.
• 40550 – The session has been terminated because it has acquired too many locks. Try reading or
modifying fewer rows in a single transaction.
• 40549 – Session is terminated because you have a long running transaction. Try shortening your
transaction.
• 40551 – The session has been terminated because of excessive TEMPDB usage. Try modifying
your query to reduce temporary table space usage.
• 40552 – The session has been terminated because of excessive transaction log space usage. Try
modifying fewer rows in a single transaction.
• 40553 – The session has been terminated because of excessive memory usage. Try modifying your
query to process fewer rows.
• 40545- The service is experiencing a problem that is currently under investigation.
• 40544 – The database has reached its size quota. Partition or delete data, drop indexes, or consult
the documentation for possible resolutions.
• 40174 – The partition is in transition and transactions are being terminated.
@brisebois
• It has been around since the early days of .Net and has been
tested thoroughly
• Can be used to repopulate the database
• Has change tracking through the DataRow RowState property.
• Is a 2 dimensional array with individually typed columns
• It can be consumed using Linq
http://bit.ly/1iwF8Ko
@brisebois http://bit.ly/1cRWP6U
@brisebois http://bit.ly/1gzilg5
@brisebois http://bit.ly/1cRWP6U
@brisebois
@brisebois

More Related Content

PPTX
SQL 2014 In-Memory OLTP
PDF
EDB Postgres DBA Best Practices
 
PDF
Espresso_DevOps_BLR_Meetup_28_Mar_2015
PDF
Scalability Considerations
PDF
2016 may-countdown-to-postgres-v96-parallel-query
PPTX
How to use splitter component
PPTX
All about Storage - Series 3 - All about indexes
PDF
Understanding and building big data Architectures - NoSQL
SQL 2014 In-Memory OLTP
EDB Postgres DBA Best Practices
 
Espresso_DevOps_BLR_Meetup_28_Mar_2015
Scalability Considerations
2016 may-countdown-to-postgres-v96-parallel-query
How to use splitter component
All about Storage - Series 3 - All about indexes
Understanding and building big data Architectures - NoSQL

What's hot (12)

PPTX
How to use bean as datasource in database connector
PPTX
How to use smtp endpoint
PPTX
Until Successful Component
PPTX
X-DB Replication Server and MMR
ODP
Joeffice, the open source database viewer in 1 day
PPTX
Database Component
PPT
Dba lounge-sql server-performance-troubleshooting
PPTX
Hardware planning & sizing for sql server
PPTX
The Magic of Tuning in PostgreSQL
PPTX
Webinar: Capacity Planning
PDF
Php & web server performace
PPTX
How to use until successful component
How to use bean as datasource in database connector
How to use smtp endpoint
Until Successful Component
X-DB Replication Server and MMR
Joeffice, the open source database viewer in 1 day
Database Component
Dba lounge-sql server-performance-troubleshooting
Hardware planning & sizing for sql server
The Magic of Tuning in PostgreSQL
Webinar: Capacity Planning
Php & web server performace
How to use until successful component
Ad

Similar to Windows azure sql database & your data (20)

PPTX
How_To_Soup_Up_Your_Farm
PPTX
SPS Kansas City: What SharePoint Admin need to know about SQL
PPTX
What SharePoint Admins need to know about SQL-Cinncinati
PPTX
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
PPTX
What SQL DBAs need to know about SharePoint-Indianapolis 2013
PPTX
Best storage engine for MySQL
PDF
Designing and Building Next Generation Data Pipelines at Scale with Structure...
PDF
60 Admin Tips
PDF
(ATS6-PLAT06) Maximizing AEP Performance
PPTX
What SQL DBA's need to know about SharePoint-St. Louis 2013
PPTX
AWS Redshift Introduction - Big Data Analytics
PPTX
SQL Server Wait Types Everyone Should Know
PPTX
SharePoint 2010 database maintenance
PDF
Boost the Performance of SharePoint Today!
PDF
Breaking data
PPTX
Monitorando performance no Azure SQL Database
PDF
Shard-Query, an MPP database for the cloud using the LAMP stack
PPTX
Dev Analytics Aggregate DB Design Analysis
PPTX
What SQL DBAs need to know about SharePoint-Kansas City, Sept 2013
PPTX
Investigate SQL Server Memory Like Sherlock Holmes
How_To_Soup_Up_Your_Farm
SPS Kansas City: What SharePoint Admin need to know about SQL
What SharePoint Admins need to know about SQL-Cinncinati
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
What SQL DBAs need to know about SharePoint-Indianapolis 2013
Best storage engine for MySQL
Designing and Building Next Generation Data Pipelines at Scale with Structure...
60 Admin Tips
(ATS6-PLAT06) Maximizing AEP Performance
What SQL DBA's need to know about SharePoint-St. Louis 2013
AWS Redshift Introduction - Big Data Analytics
SQL Server Wait Types Everyone Should Know
SharePoint 2010 database maintenance
Boost the Performance of SharePoint Today!
Breaking data
Monitorando performance no Azure SQL Database
Shard-Query, an MPP database for the cloud using the LAMP stack
Dev Analytics Aggregate DB Design Analysis
What SQL DBAs need to know about SharePoint-Kansas City, Sept 2013
Investigate SQL Server Memory Like Sherlock Holmes
Ad

More from Brisebois (6)

PPTX
Devteach 2016: A practical overview of actors in service fabric
PPTX
Working with microsoft azure resources
PPTX
What is Microsoft Azure?
PPTX
Orleans – a “cloud native” runtime built for #azure
PPTX
Windows azurewebsites
PPTX
Une RESTful Architecture
Devteach 2016: A practical overview of actors in service fabric
Working with microsoft azure resources
What is Microsoft Azure?
Orleans – a “cloud native” runtime built for #azure
Windows azurewebsites
Une RESTful Architecture

Recently uploaded (20)

PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Machine learning based COVID-19 study performance prediction
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Cloud computing and distributed systems.
PDF
Encapsulation theory and applications.pdf
PPT
Teaching material agriculture food technology
PDF
Approach and Philosophy of On baking technology
PDF
KodekX | Application Modernization Development
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
Advanced methodologies resolving dimensionality complications for autism neur...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Programs and apps: productivity, graphics, security and other tools
Machine learning based COVID-19 study performance prediction
MYSQL Presentation for SQL database connectivity
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Digital-Transformation-Roadmap-for-Companies.pptx
20250228 LYD VKU AI Blended-Learning.pptx
Cloud computing and distributed systems.
Encapsulation theory and applications.pdf
Teaching material agriculture food technology
Approach and Philosophy of On baking technology
KodekX | Application Modernization Development
Agricultural_Statistics_at_a_Glance_2022_0.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Dropbox Q2 2025 Financial Results & Investor Presentation

Windows azure sql database & your data

Editor's Notes

  • #5: -
  • #9: Master is read-onlyREAD COMMITTED SNAPSHOT does optimistic reads and pessimistic writes. In contrast, SNAPSHOTdoes optimistic reads and optimistic writes.When either the READ_COMMITTED_SNAPSHOT or ALLOW_SNAPSHOT_ISOLATION database options are ON, logical copies (versions) are maintained for all data modifications performed in the database. Every time a row is modified by a specific transaction, the instance of the Database Engine stores a version of the previously committed image of the row in tempdb. Each version is marked with the transaction sequence number of the transaction that made the change. The versions of modified rows are chained using a link list. The newest row value is always stored in the current database and chained to the versioned rows stored in tempdb.READ COMMITTED SNAPSHOT does optimistic reads and pessimistic writes. In contrast, SNAPSHOTdoes optimistic reads and optimistic writes.
  • #12: CREATE TABLE [dbo].[TestTable] (    [Id]        UNIQUEIDENTIFIER NOT NULL,    [FirstName] NVARCHAR (10)    NOT NULL,    [LastName]  NVARCHAR (10)    NOT NULL,    [Type]      INT              NOT NULL,    [Timestamp] ROWVERSION       NOT NULL,    PRIMARY KEY (Id));
  • #13: CREATE TABLE [dbo].[TestTable] (    [Id]        UNIQUEIDENTIFIER NOT NULL,    [FirstName] NVARCHAR (10)    NOT NULL,    [LastName]  NVARCHAR (10)    NOT NULL,    [Type]      INT              NOT NULL,    [Timestamp] ROWVERSION       NOT NULL,    PRIMARY KEY NONCLUSTERED (Id));CREATE CLUSTERED INDEX IX_TestTable on TestTable (FirstName, LastName);
  • #14: CREATE CLUSTERED INDEX IX_TestTableON TestTable ([Type],[FirstName],[LastName])WITH (DROP_EXISTING=ON)ON [Primary]
  • #15: CREATE CLUSTERED INDEX IX_TestTableON TestTable ([Type],[FirstName],[LastName])WITH (DROP_EXISTING=ON)ON [Primary]
  • #16: CREATE CLUSTERED INDEX IX_TestTableON TestTable ([Type],[FirstName],[LastName])WITH (DROP_EXISTING=ON)ON [Primary]
  • #17: CREATE INDEX [IX_TestTable_Country_City_LastName_FirstName]     ON [dbo].[TestTable]     ([Country] ASC,[City] ASC,[LastName] ASC,[FirstName] ASC)    WITH(ONLINE=ON);
  • #18: CREATE INDEX [IX_TestTable_Country_City_LastName_FirstName]     ON [dbo].[TestTable]     ([Country] ASC,[City] ASC,[LastName] ASC,[FirstName] ASC)    WITH(ONLINE=ON);
  • #19: CREATE INDEX [IX_TestTable_Country_City_LastName_FirstName]     ON [dbo].[TestTable]     ([Country] ASC,[City] ASC,[LastName] ASC,[FirstName] ASC)    WITH(ONLINE=ON);
  • #20: CREATE INDEX [IX_TestTable_Country_City_LastName_FirstName]     ON [dbo].[TestTable]     ([Country] ASC,[City] ASC,[LastName] ASC,[FirstName] ASC)    WITH(ONLINE=ON);
  • #21: CREATE INDEX [IX_TestTable_Country_City_LastName_FirstName]     ON [dbo].[TestTable]     ([Country] ASC,[City] ASC,[LastName] ASC,[FirstName] ASC)    WITH(ONLINE=ON);
  • #22: Go to portalCreate Clustered Indexes on the tables’ Natural Keys. Natural Keys, are the fields that best identify the row’s data. For example, the Primary Key used for a table might be a Unique Identifier or a Big Int, but I might access data through a combination of columns. For a car these columns could be Year, Make, Model and VIN. When you create the Clustered Index, order the columns by their selectivity and use this same order when you query for the information.Create Non-Clustered Indexes on your Primary KeysCreate Non-Clustered Indexes for all Foreign KeysCreate Non-Clustered Indexes for columns that are used in WHERE, ORDER BY, MERGE, JOIN and other clauses that require matching data.
  • #25: Go to the portal
  • #27: Maximum 150 GB
  • #28: Geo Redundant Secondary Read Only Access
  • #29: Sizes are set and the database des not automatically grow
  • #36: dbForge Studio for SQL Server
  • #38: CREATE DATABASE [NewDatabaseName] AS COPY OF ServerName.[SourceDatabase]SELECT * FROM sys.dm_database_copies
  • #39: Transactions that take too long get killed or if the log goes over 2gb
  • #40: Transactions that take too long get killed or if the log goes over 2gb
  • #41: Transactions that take too long get killed or if the log goes over 2gb
  • #44: Transactions that take too long get killed or if the log goes over 1gb