SQL Azure and SqlBulkCopy



Similar documents
CRM Magic with Data Migration & Integration

Enterprise Data Integration for Microsoft Dynamics CRM

Herve Roggero 3/3/2015

Azure Scalability Prescriptive Architecture using the Enzo Multitenant Framework

Solving Business Pains with SQL Server Integration Services. SQL Server 2005 / 2008

Whitepaper: performance of SqlBulkCopy

WINDOWS AZURE SQL DATA SYNC

Microsoft SQL Database Administrator Certification

Administering a SQL Database Infrastructure

Administering a SQL Database Infrastructure 20764; 5 Days; Instructor-led

PASS4TEST 専 門 IT 認 証 試 験 問 題 集 提 供 者

SQL Server Instance-Level Benchmarks with DVDStore

ADMINISTERING MICROSOFT SQL SERVER DATABASES

PROCESSES LOADER 9.0 SETTING. Requirements and Assumptions: I. Requirements for the batch process:

SQL Server 2016 New Features!

WINDOWS AZURE SQL REPORTING

Building Composite Application Services with Windows Server AppFabric. Rick G.

Course 20462C: Administering Microsoft SQL Server Databases

Administering Microsoft SQL Server Databases

Building a BI Solution in the Cloud

Release Automation for Siebel

Coveo Platform 7.0. Microsoft SharePoint Connector Guide

Utilizing SFTP within SSIS

SharePoint What's New, What's Not. Colin Phillips :: SharePoint MVP & Consultant :: itgroove

This module provides an overview of service and cloud technologies using the Microsoft.NET Framework and the Windows Azure cloud.

Data Integrator Performance Optimization Guide

Agenda. SSIS - enterprise ready ETL

MICROSOFT EXAM QUESTIONS & ANSWERS

20465: Designing a Data Solution with Microsoft SQL Server

How To Create A Large Data Storage System

BI xpress Product Overview

MS 20465C: Designing a Data Solution with Microsoft SQL Server

Administering Microsoft SQL Server Databases

Microsoft SQL Server Beginner course content (3-day)

Designing a Data Solution with Microsoft SQL Server 2014

"Charting the Course... MOC C Designing a Data Solution with Microsoft SQL Server Course Summary

SQL Server 2014 New Features/In- Memory Store. Juergen Thomas Microsoft Corporation

Designing a Data Solution with Microsoft SQL Server 2014

Course 20465C: Designing a Data Solution with Microsoft SQL Server

Development and Management

Designing a Data Solution with Microsoft SQL Server

Top 10 Oracle SQL Developer Tips and Tricks

David Dye. Extract, Transform, Load

Administering Microsoft SQL Server Databases

Below are the some of the new features of SQL Server that has been discussed in this course

Course 20465: Designing a Data Solution with Microsoft SQL Server

Designing a Data Solution with Microsoft SQL Server

10775 Administering Microsoft SQL Server Databases

Administering a SQL Database Infrastructure (MS )

Administering Microsoft SQL Server Databases 20462C; 5 days

PUBLIC Performance Optimization Guide

SQL Server Integration Services. Design Patterns. Andy Leonard. Matt Masson Tim Mitchell. Jessica M. Moss. Michelle Ufford

Implementing a Data Warehouse with Microsoft SQL Server 2012

Microsoft Administering Microsoft SQL Server Databases

Administering Microsoft SQL Server Databases

Administering Microsoft SQL Server Databases

Toad for Oracle 8.6 SQL Tuning

Migrating SaaS Applications to Windows Azure

Administering Microsoft SQL Server Databases

Oracle Application Express Cloud Development. Jan Huyzentruyt - Stijn Van Raes

SQL SERVER DEVELOPER Available Features and Tools New Capabilities SQL Services Product Licensing Product Editions Will teach in class room

Improve Business Productivity and User Experience with a SanDisk Powered SQL Server 2014 In-Memory OLTP Database

Course: Administering Microsoft SQL Server Databases Overview

Installation Guide for contineo

SSIS Scaling and Performance

Cloud Computing. With MySQL and Pentaho Data Integration. Matt Casters Chief Data Integration at Pentaho Kettle project founder

DBMS / Business Intelligence, SQL Server

Analyzing Network Servers. Disk Space Utilization Analysis. DiskBoss - Data Management Solution

"Charting the Course... MOC AC SQL Server 2014 Performance Tuning and Optimization. Course Summary

HOW TO DO A SMART DATA PROJECT

SQL Azure vs. SQL Server

SQL Best Practices for SharePoint admins, the reluctant DBA. ITP324 Todd Klindt

Accelerate Windows Server Migrations with Dell Software and AppZero. 29 th January 2015

20462C: Administering Microsoft SQL Server Databases

Report and Dashboard Template User Guide

Application Migration Best Practices. Gregory Shepard Senior Consultant InCycle Software

Cognos Performance Troubleshooting

MODULE FRAMEWORK : Dip: Information Technology Network Integration Specialist (ITNIS) (Articulate to Edexcel: Adv. Dip Network Information Specialist)

TF04 - Leveraging SQL Server Business Intelligence Tools

SOLUTION BRIEF. JUST THE FAQs: Moving Big Data with Bulk Load.

Using Database Performance Warehouse to Monitor Microsoft SQL Server Report Content

Microsoft. Microsoft SQL Server Integration Services. Wee-Hyong Tok. Rakesh Parida Matt Masson. Xiaoning Ding. Kaarthik Sivashanmugam

20462 Administering Microsoft SQL Server Databases

10775A Administering Microsoft SQL Server 2012 Databases

INTEGRATING MICROSOFT DYNAMICS CRM WITH SIMEGO DS3

ENZO UNIFIED SOLVES THE CHALLENGES OF OUT-OF-BAND SQL SERVER PROCESSING

State of Cloud Storage Providers Industry Benchmark Report:

NUTECH COMPUTER TRAINING INSTITUTE 1682 E. GUDE DRIVE #102, ROCKVILLE, MD WEB: TEL:

Administering Microsoft SQL Server Databases MOC 20462

Application Development

MIRRORING: START TO FINISH. Ryan Adams Blog - Twitter

Administering Microsoft SQL Server Databases

AppDev OnDemand Cloud Computing Learning Library

Monitis Project Proposals for AUA. September 2014, Yerevan, Armenia

Transcription:

SQL Azure and SqlBulkCopy Presented by Herve Roggero Managing Partner, Blue Syntax Consulting SQL Azure MVP Email: hroggero@bluesyntax.net Twitter: @hroggero LinkedIn: SQL Azure and SQL Server Security LinkedIn: Azure Florida Association www.bluesyntax.net

Agenda Available tools to load data INSERT commands SqlDataAdapter Analyzing BCP Analyzing SqlBulkCopy Performance test

Available tools/techniques INSERT INSERT (2) INSERT BULK SqlDataAdapter Migration Wizard SSIS BCP / INSERT BULK SqlBulkCopy

What makes up load time? Connection Time Send Query Compile Query Execute Query Send Data

INSERT Classic way to insert records Logged operation Usually single record at a time All packets are encrypted => too verbose VERY SLOW... INSERT INTO dbo.myproducts (Name, ListPrice) VALUES ('Helmet', 25.50) INSERT INTO dbo.myproducts (Name, ListPrice) VALUES ('Wheel', 30.00);

INSERT (2) New INSERT command in SQL Server 2008 Table Value Constructor Not as verbose Operation is still logged Faster than regular INSERT, but still SLOW INSERT INTO dbo.myproducts (Name, ListPrice) VALUES ('Helmet', 25.50), ('Wheel', 30.00);

INSERT (summary) INSERT INTO SQL Azure INSERT INTO SQL Azure INSERT INTO SQL Azure

BULK INSERT NOT SUPPORTED in SQL AZURE INSERT BULK INTO SQL Server Raw packets Raw packets Raw packets TERMINATION File

INSERT BULK Supported but requires feeding raw TDS packets => Must be used by a Tool Very efficient and lean Sends 1 INSERT statement Everything that follows are raw data packets NO FURTHER COMPILATION/QUERY EXECUTION SQL Azure waits until Session sends TERMINATION Operation not logged FAST

INSERT BULK (cont.) INSERT BULK INTO Raw packets Raw packets Raw packets TERMINATION SQL Azure

BCP Uses INSERT BULK Performance of BCP depends on INSERT BULK However BCP can also extract data FAST

Tools Tools that use the BCP program: SSIS: Bulk Insert Task SQL Azure Migration Wizard http://sqlazuremw.codeplex.com/ Tools that use the SQL Bulk Copy API Enzo Data Copy

SqlDataAdapter Based on XML Datagrams (differences) Very memory intensive Can be very slow depending on approach Provides a way to work in Batches Sends INSERT operations SLOW

SqlBulkCopy Uses INSERT BULK operation Programmatic access, options similar to BCP Can send data in Batch FAST

Techniques Summary Tool/Technique Operation Logged Speed INSERT INSERT Yes SLOW BULK INSERT BULK INSERT No n/a INSERT BULK INSERT BULK No FAST BCP INSERT BULK No FAST SSIS/ Migration Wizard INSERT BULK No FAST Data Adapter INSERT Yes SLOW SqlBulkCopy INSERT BULK No FAST Enzo Data Copy INSERT BULK No FAST

About the performance test Load 40,000 records (on-premise -> SQL Azure) Uses multithreading (TPL) 8 threads Comparing Data Adapter Stored Procedure SqlBulkCopy API INSERTs

Load Time (sec) Performance Chart X: Batch Size; Y: Load Time {40K records; DOP = 8} Data Adapter Stored Procedure SqlBulkCopy INSERT 2 [limited to batch of 1000] 30 20 10 100 500 1000 2000 3000 4000 Batch Size

Comparing Tools 30 25 20 15 10 5 0 40,000 Records (in secs) 2,000,000 Records (in mins) SSIS 4.2 2.17 SQL Bulk Copy 2.18 4.3 Enzo Data Copy 25 1.41 SSIS SQL Bulk Copy Enzo Data Copy

Demos Sample Code Uses parallel processing on all methods Compares: Data Adapter Inline INSERTs Stored Procedure INSERTs SqlBulkCopy SSIS Enzo Data Copy (www.bluesyntax.net)

Considerations Resilience to Throttling Adapting to throttling conditions Changing workload depending on errors Connection Retries Retrying for connection loss Causes include throttling, load balancing, network http://social.technet.microsoft.com/wiki/contents/articles/sql-azure-connection-management.aspx

Thank you Presented by Herve Roggero Managing Partner, Blue Syntax Consulting SQL Azure MVP Email: hroggero@bluesyntax.net Twitter: @hroggero LinkedIn: SQL Azure and SQL Server Security LinkedIn: Azure Florida Association Blog: www.geekswithblogs.net/hroggero www.bluesyntax.net