Are Your Indexes Helping You or Hurting You? Jes Borland, Brent Ozar Unlimited

Size: px
Start display at page:

Download "Are Your Indexes Helping You or Hurting You? Jes Borland, Brent Ozar Unlimited"

Transcription

1 Are Your Indexes Helping You or Hurting You? Jes Borland, Brent Ozar Unlimited

2 Your mission: Leave this session able to make better index choices so that your indexes solve performance problems rather than contribute to them.

3 Jes Borland Consultant, Brent Ozar Unlimited

4 Are your indexes helping you or hurting you?

5 What helps? What hurts? Indexes that help Make retrieving data faster Don t slow down INSERT, UPDATE, or DELETE queries significantly Indexes that hurt Aren t being used by SELECT queries Slow down INSERT, UPDATE, or DELETE queries

6 Index Basics

7 This session won t cover Filtered indexes Indexed views XML indexes Spatial indexes Columnstore indexes Memory-optimized indexes

8 A heap of data An unordered collection of data Contains all the columns and rows in the table

9 Apply a clustered index One or more "keys", or columns Data is retrieved in order by that key Remember: the data is not guaranteed to be stored on each page in order! Still contains all the columns and rows in the table

10 Nonclustered indexes Pick one or more columns as the keys Data is retrieved in order by that key All rows are stored, but only a subset of the column(s) are stored This helps! Narrower Less I/O

11 Did you know The nonclustered index contains the clustered index key Thus: no need to put the clustered index key in the nonclustered index

12 Clustered Index Key Size The wider your clustered index key, the wider all of the nonclustered indexes on that table This hurts More storage space More I/O

13 Mission 1: Identify your server s workload

14 Workload types OLTP transactional Many INSERT, UPDATE, DELETE statements Small transactions SELECT a few rows at a time OLAP analytical Many SELECT statements, especially with aggregations Large, long-running transactions Large batch updates

15 What is my server s workload? Dig into the plan cache Plan cache DMVs sp_blitzcache Capture events in real time Extended Events session Server-side trace (especially when aggregated with a tool like Clear Trace)

16 Design for workload OLTP Writes need to be fast Few indexes Narrow indexes OLAP Reads need to be fast Indexes to support queries and aggregations Wide indexes

17 I have both You may need to consider A different isolation level A technology to offload reads

18 Mission 2: Identify what indexes already exist

19 What indexes exist on my tables? Script them out in SSMS Use sys.indexes and sys.index_columns Use a tool like sp_blitzindex

20 Mission 3: Determine if the indexes are helping

21 A table with several nonclustered indexes Same columns, different orders A query executes What will make the query optimizer consider - or not consider - each index? What predicates are in the WHERE clause? How selective are they?

22 Nonclustered index key columns support predicates in the WHERE clause

23 What about SELECT? Use INCLUDE columns These are stored on the page also, but not sorted by the included columns

24 This helps Unless it's all (or most of) the columns from a table Then it hurts

25 What about ORDER BY? Then show how you create an index and turn a query with an expensive Sort into a query with "Ordered=True" on the Index Scan.

26 Lesson learned If your index doesn't contain all the fields the query references, it will have to get them somewhere Seek/key lookup Seek/RID lookup Scan of another index This hurts

27 Mission 4: Identify which query patterns affect index usage

28 Sargability

29 Search this slide Ann Anne Annie Barbara Carrie Danica Danielle Dorothy Elle Esther Fanny Fay Gina Giselle Heather Indica Jeanne Jeannie Jen Jena Jenae Jenelle Jenna Jennie Jennifer Kendra Kiera Kim Lisa Mary Maryann Maryanne Michelle Monica Nina Oprah Pam Paige Patty Quinn Randie Rochelle Sabrina Sandy Sarah Tammy Tessa Uma Victoria Violet Wanda Xena Yasmine Zahara Zabrina

30 How did you find the strings?

31 In SQL Server SELECT FirstName FROM Person WHERE FirstName LIKE '%Jen%'

32 This is a non-sargable query Non Search ARGument -able

33 Try it again

34 Search this slide Ann Anne Annie Barbara Carrie Danica Danielle Dorothy Elle Esther Fanny Fay Gina Giselle Heather Indica Jeanne Jeannie Jen Jena Jenae Jenelle Jenna Jennie Jennifer Kendra Kiera Kim Lisa Mary Maryann Maryanne Michelle Monica Nina Oprah Pam Paige Patty Quinn Randie Rochelle Sabrina Sandy Sarah Tammy Tessa Uma Victoria Violet Wanda Xena Yasmine Zahara Zabrina

35 In SQL Server SELECT FirstName FROM Person WHERE FirstName LIKE 'Jen%'

36 This is a sargable query Search ARGument -able

37 Lesson learned If you have a wildcard contains search, SQL Server will not use your index the way you intended it to Indexes on character fields (in particular) can hurt you

38 Dilemma Sometimes, we need to find a specific value in a field Options?

39 Static value Always occurs in the same place Five characters to the left Last three characters Consider computed column

40 Variable value Full text search Create full-text catalog Create full-text index Do prefix searches Free-text searching tool For truly variable values such as %able% ElasticSearch, Lucene, and more

41 Statistics

42 You are my data

43 The data changes!

44 SQL Server does this, too! Tables and indexes have statistics

45 When are statistics created & updated? Room is empty When the first person enters

46 Room has 400 people There are more than 500 changes One person at a time can leave/enter, but that has to happen 500 times Heck, two people can trade off as long as they do it 500 times

47 Room that has 4,000 people There are 20% changes (4,000 X.2) = 1,300

48 Stadium that has 40,000 people 20% changes (40,000 X.2) = 8,500

49 City that has 4,000,000 people 20% changes (4,000,000 X.2) = = 8,000,500

50 The larger the table The more changes that need to happen for statistics to automatically update Can lead to out-of-date statistics Might need manual intervention

51 Trace flag 2371 SQL Server 2008R2 SP1 + Statistics are updated based on the number of rows in the table Larger tables need fewer updates to trigger auto updates

52 Stats out of date? SQL Server will make bad choices

53 How can I tell? Estimated vs. actual rows in an actual execution plan DBCC SHOWSTATISTICS sys.stats STATS_DATE

54 Lesson learned If statistics are very out of date, SQL Server may choose a bad operation Look at the difference between estimated rows and actual rows if you suspect out-of-date statistics are causing a bad plan

55 Mission 5: Determine if your indexes are being used

56 How do I know if SQL Server is using my indexes? sys.dm_db_index_usage_stats Built into sp_blitzindex But this isn't perfect! Resets when SQL Server is started When database is detached or shut down In 2012+, when index is rebuilt (not reorganized)

57 When can indexes hurt you? Too many on tables frequently updated Not enough key columns; not in right order No included columns; not enough When index exists but query is non-sargable and can't use it When stats for index are out of date and SQL Server can't pick a good plan

58 When can indexes help you? When an appropriate clustered index sorts and stores the data in a useful way When nonclustered indexes are narrow and satisfy WHERE clauses When included columns on nonclustered indexes satisfy SELECT, etc clauses When statistics are up-to-date

59 Are your indexes helping you or hurting you? Chances are good it's both!

60 Know your workload

61 Know what indexes exist

62 Know query patterns that won t use indexes optimally

63 Know which are being used - and which aren't

64 Questions?

65 Thank You for Attending

INTRODUCTION TO INDEXES AND SARGABILITY

INTRODUCTION TO INDEXES AND SARGABILITY INTRODUCTION TO INDEXES AND SARGABILITY Jared Karney @sqlknowitall http://www.sqlknowitall.com jared.karney@microsoft.com WHAT ARE INDEXES AND WHY DO WE CARE? Database objects we create Make queries run

More information

I Want To Go Faster! A Beginner s Guide to Indexing

I Want To Go Faster! A Beginner s Guide to Indexing I Want To Go Faster! A Beginner s Guide to Indexing Bert Wagner Slides available here! @bertwagner bertwagner.com youtube.com/c/bertwagner bert@bertwagner.com Why Indexes? Biggest bang for the buck Can

More information

Identifying and Fixing Parameter Sniffing

Identifying and Fixing Parameter Sniffing Identifying and Fixing Parameter Sniffing Brent Ozar www.brentozar.com sp_blitz sp_blitzfirst email newsletter videos SQL Critical Care 2017 Brent Ozar Unlimited. All rights reserved. 1 This is genuinely

More information

Module 9: Managing Schema Objects

Module 9: Managing Schema Objects Module 9: Managing Schema Objects Overview Naming guidelines for identifiers in schema object definitions Storage and structure of schema objects Implementing data integrity using constraints Implementing

More information

Introduction to Statistics in SQL Server. Andy Warren

Introduction to Statistics in SQL Server. Andy Warren Introduction to Statistics in SQL Server Andy Warren www.sqlandy.com @sqlandy www.linkedin.com/in/sqlandy Why Do We Need Statistics? We can t build a good plan to get the rows we need without having an

More information

Building Better. SQL Server Databases

Building Better. SQL Server Databases Building Better SQL Server Databases Who is this guy? Eric Cobb SQL Server Database Administrator MCSE: Data Platform MCSE: Data Management and Analytics 1999-2013: Webmaster, Programmer, Developer 2014+:

More information

Natural Born Killers, performance issues to avoid

Natural Born Killers, performance issues to avoid Natural Born Killers, performance issues to avoid Richard Douglas http://sql.richarddouglas.co.uk @SQLRich Natural Born Killer http://www.flickr.com/photos/merille/4747615138/sizes/z/in/photostream/ 2

More information

DESIGNING FOR PERFORMANCE SERIES. Smokin Fast Queries Query Optimization

DESIGNING FOR PERFORMANCE SERIES. Smokin Fast Queries Query Optimization DESIGNING FOR PERFORMANCE SERIES Smokin Fast Queries Query Optimization Jennifer Smith, MCSE Agenda Statistics Execution plans Cached plans/recompilation Indexing Query writing tips New performance features

More information

Martin Cairney. The Why and How of Partitioned Tables

Martin Cairney. The Why and How of Partitioned Tables Martin Cairney The Why and How of ed Tables Housekeeping Mobile Phones please set to stun during the session Session Evaluation Martin Cairney Microsoft Data Platform MVP Microsoft Certified Trainer Organiser

More information

SQL Server 2014 Internals and Query Tuning

SQL Server 2014 Internals and Query Tuning SQL Server 2014 Internals and Query Tuning Course ISI-1430 5 days, Instructor led, Hands-on Introduction SQL Server 2014 Internals and Query Tuning is an advanced 5-day course designed for experienced

More information

6232B: Implementing a Microsoft SQL Server 2008 R2 Database

6232B: Implementing a Microsoft SQL Server 2008 R2 Database 6232B: Implementing a Microsoft SQL Server 2008 R2 Database Course Overview This instructor-led course is intended for Microsoft SQL Server database developers who are responsible for implementing a database

More information

5/2/2015. Overview of SSIS performance Troubleshooting methods Performance tips

5/2/2015. Overview of SSIS performance Troubleshooting methods Performance tips Overview of SSIS performance Troubleshooting methods Performance tips 2 Business intelligence consultant Partner, Linchpin People SQL Server MVP TimMitchell.net / @Tim_Mitchell tim@timmitchell.net 3 1

More information

Columnstore Technology Improvements in SQL Server 2016

Columnstore Technology Improvements in SQL Server 2016 Columnstore Technology Improvements in SQL Server 2016 Subtle Subtitle AlwaysOn Niko Neugebauer Our Sponsors Niko Neugebauer Microsoft Data Platform Professional OH22 (http://www.oh22.net) SQL Server MVP

More information

Martin Cairney SPLIT, MERGE & ELIMINATE. SQL Saturday #572 : Oregon : 22 nd October, 2016

Martin Cairney SPLIT, MERGE & ELIMINATE. SQL Saturday #572 : Oregon : 22 nd October, 2016 Martin Cairney SPLIT, MERGE & ELIMINATE AN INTRODUCTION TO PARTITIONING SQL Saturday #572 : Oregon : 22 nd October, 2016 Housekeeping Mobile Phones please set to stun during the session Connect with the

More information

Columnstore in real life

Columnstore in real life Columnstore in real life Enrique Catalá Bañuls Computer Engineer Microsoft Data Platform MVP Mentor at SolidQ Tuning and HA ecatala@solidq.com @enriquecatala Agenda What is real-time operational analytics

More information

Course Outline. SQL Server Performance & Tuning For Developers. Course Description: Pre-requisites: Course Content: Performance & Tuning.

Course Outline. SQL Server Performance & Tuning For Developers. Course Description: Pre-requisites: Course Content: Performance & Tuning. SQL Server Performance & Tuning For Developers Course Description: The objective of this course is to provide senior database analysts and developers with a good understanding of SQL Server Architecture

More information

20762B: DEVELOPING SQL DATABASES

20762B: DEVELOPING SQL DATABASES ABOUT THIS COURSE This five day instructor-led course provides students with the knowledge and skills to develop a Microsoft SQL Server 2016 database. The course focuses on teaching individuals how to

More information

Microsoft. [MS20762]: Developing SQL Databases

Microsoft. [MS20762]: Developing SQL Databases [MS20762]: Developing SQL Databases Length : 5 Days Audience(s) : IT Professionals Level : 300 Technology : Microsoft SQL Server Delivery Method : Instructor-led (Classroom) Course Overview This five-day

More information

SQLSaturday Sioux Falls, SD Hosted by (605) SQL

SQLSaturday Sioux Falls, SD Hosted by (605) SQL SQLSaturday 2017 Sioux Falls, SD Hosted by (605) SQL Please be sure to visit the sponsors during breaks and enter their end-of-day raffles! Remember to complete session surveys! You will be emailed a link

More information

Developing SQL Databases

Developing SQL Databases Course 20762B: Developing SQL Databases Page 1 of 9 Developing SQL Databases Course 20762B: 4 days; Instructor-Led Introduction This four-day instructor-led course provides students with the knowledge

More information

Background. Let s see what we prescribed.

Background. Let s see what we prescribed. Background Patient B s custom application had slowed down as their data grew. They d tried several different relief efforts over time, but performance issues kept popping up especially deadlocks. They

More information

Index. B Batches comparing, bit or 64-bit architecture, 5 Blocking, 42 Buff er cache, 143 Bulk changed map (BCM), 85 87

Index. B Batches comparing, bit or 64-bit architecture, 5 Blocking, 42 Buff er cache, 143 Bulk changed map (BCM), 85 87 Index A ActiveX data objects for.net, 2 ActualRowsRead attribute, 14 Allocation ring buffer, 92 93 ALTER EVENT SESSION, 150 ALTER INDEX REBUILD, 147 ALTER INDEX REORGANIZE, 147 ALTER SERVER CONFIGURATION

More information

Building Better. SQL Server Databases

Building Better. SQL Server Databases Building Better SQL Server Databases Who is this guy? Eric Cobb Started in IT in 1999 as a "webmaster Developer for 14 years Microsoft Certified Solutions Expert (MCSE) Data Platform Data Management and

More information

Background. $VENDOR wasn t sure either, but they were pretty sure it wasn t their code.

Background. $VENDOR wasn t sure either, but they were pretty sure it wasn t their code. Background Patient A got in touch because they were having performance pain with $VENDOR s applications. Patient A wasn t sure if the problem was hardware, their configuration, or something in $VENDOR

More information

Developing Microsoft SQL Server 2012 Databases

Developing Microsoft SQL Server 2012 Databases Course 10776A: Developing Microsoft SQL Server 2012 Databases Course Details Course Outline Module 1: Introduction to SQL Server 2012 and its Toolset This module stresses on the fact that before beginning

More information

Advanced Oracle SQL Tuning v3.0 by Tanel Poder

Advanced Oracle SQL Tuning v3.0 by Tanel Poder Advanced Oracle SQL Tuning v3.0 by Tanel Poder /seminar Training overview This training session is entirely about making Oracle SQL execution run faster and more efficiently, understanding the root causes

More information

SQL Server Development 20762: Developing SQL Databases in Microsoft SQL Server Upcoming Dates. Course Description.

SQL Server Development 20762: Developing SQL Databases in Microsoft SQL Server Upcoming Dates. Course Description. SQL Server Development 20762: Developing SQL Databases in Microsoft SQL Server 2016 Learn how to design and Implement advanced SQL Server 2016 databases including working with tables, create optimized

More information

Columnstore Technology Improvements in SQL Server Presented by Niko Neugebauer Moderated by Nagaraj Venkatesan

Columnstore Technology Improvements in SQL Server Presented by Niko Neugebauer Moderated by Nagaraj Venkatesan Columnstore Technology Improvements in SQL Server 2016 Presented by Niko Neugebauer Moderated by Nagaraj Venkatesan Thank You microsoft.com hortonworks.com aws.amazon.com red-gate.com Empower users with

More information

Get Your Optimizer to Give up All Its Secrets. Brian

Get Your Optimizer to Give up All Its Secrets. Brian Get Your Optimizer to Give up All Its Secrets Brian Hansen brian@tf3604.com @tf3604 Brian Hansen brian@tf3604.com @tf3604.com children.org 20 Years working with SQL Server Development work since 7.0 Administration

More information

Parameter Sniffing Problem with Stored Procedures. Milos Radivojevic

Parameter Sniffing Problem with Stored Procedures. Milos Radivojevic Parameter Sniffing Problem with Stored Procedures Milos Radivojevic About Me DI Milos Radivojevic, Vienna, Austria Data Platform Architect Database Developer MCTS SQL Server Development Contact: MRadivojevic@SolidQ.com

More information

The execution plan for the query is shown in the exhibit. (Click the Exhibit button.)

The execution plan for the query is shown in the exhibit. (Click the Exhibit button.) QUESTION 1 You have a SQL Server 2012 database named DB1. You have a backup device named Device1. You discover that the log file for the database is full. You need to ensure that DB1 can complete transactions.

More information

Kathleen Durant PhD Northeastern University CS Indexes

Kathleen Durant PhD Northeastern University CS Indexes Kathleen Durant PhD Northeastern University CS 3200 Indexes Outline for the day Index definition Types of indexes B+ trees ISAM Hash index Choosing indexed fields Indexes in InnoDB 2 Indexes A typical

More information

AlwaysOn Availability Groups: Backups, Restores, and CHECKDB

AlwaysOn Availability Groups: Backups, Restores, and CHECKDB AlwaysOn Availability Groups: Backups, Restores, and CHECKDB www.brentozar.com sp_blitz sp_blitzfirst email newsletter videos SQL Critical Care 2016 Brent Ozar Unlimited. All rights reserved. 1 What I

More information

"Charting the Course... MOC C: Developing SQL Databases. Course Summary

Charting the Course... MOC C: Developing SQL Databases. Course Summary Course Summary Description This five-day instructor-led course provides students with the knowledge and skills to develop a Microsoft SQL database. The course focuses on teaching individuals how to use

More information

Query Optimization In 15 Demos Your mom is a nice lady. Erik Darling

Query Optimization In 15 Demos Your mom is a nice lady. Erik Darling Query Optimization In 15 Demos Your mom is a nice lady. Erik Darling About me Consultant at Brent Ozar Unlimited Contributor: firstresponderkit.org Before that DBA: e-discovery Developer: market research

More information

Microsoft Developing SQL Databases

Microsoft Developing SQL Databases 1800 ULEARN (853 276) www.ddls.com.au Length 5 days Microsoft 20762 - Developing SQL Databases Price $4290.00 (inc GST) Version C Overview This five-day instructor-led course provides students with the

More information

DATABASE PERFORMANCE AND INDEXES. CS121: Relational Databases Fall 2017 Lecture 11

DATABASE PERFORMANCE AND INDEXES. CS121: Relational Databases Fall 2017 Lecture 11 DATABASE PERFORMANCE AND INDEXES CS121: Relational Databases Fall 2017 Lecture 11 Database Performance 2 Many situations where query performance needs to be improved e.g. as data size grows, query performance

More information

Practical MySQL indexing guidelines

Practical MySQL indexing guidelines Practical MySQL indexing guidelines Percona Live October 24th-25th, 2011 London, UK Stéphane Combaudon stephane.combaudon@dailymotion.com Agenda Introduction Bad indexes & performance drops Guidelines

More information

Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course:

Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course: Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course: 20762C Developing SQL 2016 Databases Module 1: An Introduction to Database Development Introduction to the

More information

Designing Database Solutions for Microsoft SQL Server (465)

Designing Database Solutions for Microsoft SQL Server (465) Designing Database Solutions for Microsoft SQL Server (465) Design a database structure Design for business requirements Translate business needs to data structures; de-normalize a database by using SQL

More information

20464: Developing Microsoft SQL Server 2014 Databases

20464: Developing Microsoft SQL Server 2014 Databases 20464: Developing Microsoft SQL Server 2014 Databases Course Outline Module 1: Introduction to Database Development This module introduces database development and the key tasks that a database developer

More information

Course Outline. Performance Tuning and Optimizing SQL Databases Course 10987B: 4 days Instructor Led

Course Outline. Performance Tuning and Optimizing SQL Databases Course 10987B: 4 days Instructor Led Performance Tuning and Optimizing SQL Databases Course 10987B: 4 days Instructor Led About this course This four-day instructor-led course provides students who manage and maintain SQL Server databases

More information

MILOŠ RADIVOJEVIĆ, PRINCIPAL DATABASE CONSULTANT, BWIN GVC, VIENNA, AUSTRIA

MILOŠ RADIVOJEVIĆ, PRINCIPAL DATABASE CONSULTANT, BWIN GVC, VIENNA, AUSTRIA MILOŠ RADIVOJEVIĆ, PRINCIPAL DATABASE CONSULTANT, BWIN GVC, VIENNA, AUSTRIA Performance Tuning with SQL Server 2017 Sponsors About Me Principal Database Consultant, bwin GVC, Vienna, Austria Data Platform

More information

[MS10987A]: Performance Tuning and Optimizing SQL Databases

[MS10987A]: Performance Tuning and Optimizing SQL Databases [MS10987A]: Performance Tuning and Optimizing SQL Databases Length : 4 Days Audience(s) : IT Professionals Level : 300 Technology : Microsoft SQL Server Delivery Method : Instructor-led (Classroom) Course

More information

ColdFusion Summit 2016

ColdFusion Summit 2016 ColdFusion Summit 2016 Building Better SQL Server Databases Who is this guy? Eric Cobb - Started in IT in 1999 as a "webmaster - Developer for 14 years - Microsoft Certified Solutions Expert (MCSE) - Data

More information

Get Your Optimizer to Give up All Its Secrets

Get Your Optimizer to Give up All Its Secrets Get Your Optimizer to Give up All Its Secrets Brian Hansen brian@tf3604.com @tf3604 SQL Saturday #631 Wausau, Wisconsin 16 September 2017 Brian Hansen 15+ Years working with SQL Server Development work

More information

Speaker: Don Vilen. Mark Ginnebaugh, User Group Leader

Speaker: Don Vilen. Mark Ginnebaugh, User Group Leader Microsoft SQL Server Filtered Indexes and Sparse Columns: Together, Separately Speaker: Don Vilen Chief Scientist, i BuySight February 2011 Mark Ginnebaugh, User Group Leader www.bayareasql.org 15 Feb

More information

Database performance becomes an important issue in the presence of

Database performance becomes an important issue in the presence of Database tuning is the process of improving database performance by minimizing response time (the time it takes a statement to complete) and maximizing throughput the number of statements a database can

More information

PERFORMANCE TUNING SQL SERVER ON CRAPPY HARDWARE 3/1/2019 1

PERFORMANCE TUNING SQL SERVER ON CRAPPY HARDWARE 3/1/2019 1 PERFORMANCE TUNING SQL SERVER ON CRAPPY HARDWARE 3/1/2019 1 FEEDBACK FORMS PLEASE FILL OUT AND PASS TO YOUR HELPER BEFORE YOU LEAVE THE SESSION MONICA RATHBUN Consultant Denny Cherry & Associates Consulting

More information

Columnstore Indexes In SQL Server 2016 #Columnstorerocks!!

Columnstore Indexes In SQL Server 2016 #Columnstorerocks!! Columnstore Indexes In SQL Server 2016 #Columnstorerocks!! Nombre: Gonzalo Bissio Experiencia: Trabajo con SQL desde la versión 2000 MCSA: 2012-2014-2016 Database Administrator MCSE: Data Platform Correo

More information

Index. Accent Sensitive (AS), 20 Aggregate functions, 286 Atomicity consistency isolation durability (ACID), 265

Index. Accent Sensitive (AS), 20 Aggregate functions, 286 Atomicity consistency isolation durability (ACID), 265 Index A Accent Sensitive (AS), 20 Aggregate functions, 286 Atomicity consistency isolation durability (ACID), 265 B Balanced (B)-Trees clustered index, 237 non-clustered index, 239 BULK INSERT statement

More information

Course Prerequisites: This course requires that you meet the following prerequisites:

Course Prerequisites: This course requires that you meet the following prerequisites: Developing MS SQL Server Databases This five-day instructor-led course introduces SQL Server 2014 and describes logical table design, indexing and query plans. It also focusses on the creation of database

More information

SQL Server 2014 In-Memory OLTP: Prepare for Migration. George Li, Program Manager, Microsoft

SQL Server 2014 In-Memory OLTP: Prepare for Migration. George Li, Program Manager, Microsoft SQL Server 2014 In-Memory OLTP: Prepare for Migration George Li, Program Manager, Microsoft Drivers Architectural Pillars Customer Benefits In-Memory OLTP Recap High performance data operations Efficient

More information

Venezuela: Teléfonos: / Colombia: Teléfonos:

Venezuela: Teléfonos: / Colombia: Teléfonos: CONTENIDO PROGRAMÁTICO Moc 20761: Querying Data with Transact SQL Module 1: Introduction to Microsoft SQL Server This module introduces SQL Server, the versions of SQL Server, including cloud versions,

More information

20464 Developing Microsoft SQL Server Databases

20464 Developing Microsoft SQL Server Databases Course Overview This 5-day instructor-led course introduces SQL Server 2014 and describes logical table design, indexing and query plans. It also focuses on the creation of database objects including views,

More information

Performance Tuning & Optimizing SQL Databases Microsoft Official Curriculum (MOC 10987)

Performance Tuning & Optimizing SQL Databases Microsoft Official Curriculum (MOC 10987) Performance Tuning & Optimizing SQL Databases Microsoft Official Curriculum (MOC 10987) Course Length: 4 days Course Delivery: Traditional Classroom Online Live Course Overview This 4-day instructor-led

More information

Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting

Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting Slide 1: Cover Welcome to lesson 3 of the db2 on Campus lecture series. Today we're going to talk about tools and scripting, and this is part 1 of 2

More information

Database Systems CSE 414

Database Systems CSE 414 Database Systems CSE 414 Lecture 10: Basics of Data Storage and Indexes 1 Reminder HW3 is due next Tuesday 2 Motivation My database application is too slow why? One of the queries is very slow why? To

More information

Ms Sql Server 2008 R2 Check If Temp Table Exists

Ms Sql Server 2008 R2 Check If Temp Table Exists Ms Sql Server 2008 R2 Check If Temp Table Exists I need to store dynamic sql result into a temporary table #Temp. Dynamic SQL Query How to check if column exists in SQL Server table 766 Insert results.

More information

[MS20464]: Developing Microsoft SQL Server 2014 Databases

[MS20464]: Developing Microsoft SQL Server 2014 Databases [MS20464]: Developing Microsoft SQL Server 2014 Databases Length : 5 Days Audience(s) : IT Professionals Level : 300 Technology : SQL Server Delivery Method : Instructor-led (Classroom) Course Overview

More information

Microsoft. Transition Your MCITP: Database Administrator 2008 or MCITP Database Developer 2008 to MCSE: Data Platform

Microsoft. Transition Your MCITP: Database Administrator 2008 or MCITP Database Developer 2008 to MCSE: Data Platform Microsoft 70-459 Transition Your MCITP: Database Administrator 2008 or MCITP Database Developer 2008 to MCSE: Data Platform Download Full Version : https://killexams.com/pass4sure/exam-detail/70-459 QUESTION:

More information

Query Processing Task

Query Processing Task Execution Plans Indexing to achieve optimal query plans Author: Ted Krueger - LessThanDot The obstacle SQL Server and data storage itself is only as good as the means in which we can read the data. Very

More information

Microsoft SQL Server Database Administration

Microsoft SQL Server Database Administration Address:- #403, 4 th Floor, Manjeera Square, Beside Prime Hospital, Ameerpet, Hyderabad 500038 Contact: - 040/66777220, 9177166122 Microsoft SQL Server Database Administration Course Overview This is 100%

More information

Manual Trigger Sql Server 2008 Update Inserted Rows

Manual Trigger Sql Server 2008 Update Inserted Rows Manual Trigger Sql Server 2008 Update Inserted Rows Am new to SQL scripting and SQL triggers, any help will be appreciated Does it need to have some understanding of what row(s) were affected, sql-serverperformance.com/2010/transactional-replication-2008-r2/

More information

DATA WAREHOUSING II. CS121: Relational Databases Fall 2017 Lecture 23

DATA WAREHOUSING II. CS121: Relational Databases Fall 2017 Lecture 23 DATA WAREHOUSING II CS121: Relational Databases Fall 2017 Lecture 23 Last Time: Data Warehousing 2 Last time introduced the topic of decision support systems (DSS) and data warehousing Very large DBs used

More information

SQL Server 2014 Column Store Indexes. Vivek Sanil Microsoft Sr. Premier Field Engineer

SQL Server 2014 Column Store Indexes. Vivek Sanil Microsoft Sr. Premier Field Engineer SQL Server 2014 Column Store Indexes Vivek Sanil Microsoft Vivek.sanil@microsoft.com Sr. Premier Field Engineer Trends in the Data Warehousing Space Approximate data volume managed by DW Less than 1TB

More information

70-459: Transition Your MCITP: Database Administrator 2008 or MCITP: Database Developer 2008 to MCSE: Data Platform

70-459: Transition Your MCITP: Database Administrator 2008 or MCITP: Database Developer 2008 to MCSE: Data Platform 70-459: Transition Your MCITP: Database Administrator 2008 or MCITP: Database Developer 2008 to MCSE: Data Platform The following tables show where changes to exam 70-459 have been made to include updates

More information

Manual Trigger Sql Server Update Column Example

Manual Trigger Sql Server Update Column Example Manual Trigger Sql Server Update Column Example I wish to specify a trigger where a is updated as soon as z is updated. Something The manual page for CREATE TRIGGER has this example, which should be easy

More information

What is a Page Split. Fill Factor. Example Code Showing Page Splits

What is a Page Split. Fill Factor. Example Code Showing Page Splits What is a Page Split Tables, and indexes are organized in SQL Server into 8K chunks called pages. If you have rows that are 100k each, you can fit about 80 of those rows into a given page. If you update

More information

Manual Trigger Sql Server Update Column Changed

Manual Trigger Sql Server Update Column Changed Manual Trigger Sql Server Update Column Changed You can rename a table column in SQL Server 2016 by using SQL Server Topic Status: Some information in this topic is preview and subject to change in You

More information

Tomasz Libera. Azure SQL Data Warehouse

Tomasz Libera. Azure SQL Data Warehouse Tomasz Libera Azure SQL Data Warehouse Thanks to our partners! About me Microsoft MVP Data Platform Microsoft Certified Trainer SQL Server Developer Academic Trainer datacommunity.org.pl One of the leaders

More information

T-sql Check If Index Exists Information_schema

T-sql Check If Index Exists Information_schema T-sql Check If Index Exists Information_schema Is there another way to check if table/column exists in SQL Server? indexes won't pick them up, causing it to use the Clustered Index whenever a new column

More information

SQL Server DBA Course Content

SQL Server DBA Course Content 1 SQL Server DBA Course Content SQL Server Versions and Editions Features of SQL Server Differentiate the SQL Server and Oracle Services of SQL Server Tools of SQL server SQL Server Installation SQL server

More information

7. Query Processing and Optimization

7. Query Processing and Optimization 7. Query Processing and Optimization Processing a Query 103 Indexing for Performance Simple (individual) index B + -tree index Matching index scan vs nonmatching index scan Unique index one entry and one

More information

Eternal Story on Temporary Objects

Eternal Story on Temporary Objects Eternal Story on Temporary Objects Dmitri V. Korotkevitch http://aboutsqlserver.com About Me 14+ years of experience working with Microsoft SQL Server Microsoft SQL Server MVP Microsoft Certified Master

More information

TEN QUERY TUNING TECHNIQUES

TEN QUERY TUNING TECHNIQUES TEN QUERY TUNING TECHNIQUES Every SQL Programmer Should Know Kevin Kline Director of Engineering Services at SentryOne Microsoft MVP since 2003 Facebook, LinkedIn, Twitter at KEKLINE kkline@sentryone.com

More information

Unit 3 Disk Scheduling, Records, Files, Metadata

Unit 3 Disk Scheduling, Records, Files, Metadata Unit 3 Disk Scheduling, Records, Files, Metadata Based on Ramakrishnan & Gehrke (text) : Sections 9.3-9.3.2 & 9.5-9.7.2 (pages 316-318 and 324-333); Sections 8.2-8.2.2 (pages 274-278); Section 12.1 (pages

More information

Introduction to Database Systems CSE 344

Introduction to Database Systems CSE 344 Introduction to Database Systems CSE 344 Lecture 10: Basics of Data Storage and Indexes 1 Student ID fname lname Data Storage 10 Tom Hanks DBMSs store data in files Most common organization is row-wise

More information

SQL Server Administration 10987: Performance Tuning and Optimizing SQL Databases. Upcoming Dates. Course Description.

SQL Server Administration 10987: Performance Tuning and Optimizing SQL Databases. Upcoming Dates. Course Description. SQL Server Administration 10987: Performance Tuning and Optimizing SQL Databases Learn the high level architectural overview of SQL Server 2016 and explore SQL Server execution model, waits and queues

More information

COMP 430 Intro. to Database Systems. Indexing

COMP 430 Intro. to Database Systems. Indexing COMP 430 Intro. to Database Systems Indexing How does DB find records quickly? Various forms of indexing An index is automatically created for primary key. SQL gives us some control, so we should understand

More information

Exam Questions

Exam Questions Exam Questions 70-464 Developing Microsoft SQL Server 2012 Databases https://www.2passeasy.com/dumps/70-464/ 1. You create a view by using the following code: Several months after you create the view,

More information

SELECT TOP (?) * FROM [50 Things All SQL Server Developers Need To Know] Aaron Bertrand, Senior Consultant

SELECT TOP (?) * FROM [50 Things All SQL Server Developers Need To Know] Aaron Bertrand, Senior Consultant SELECT TOP (?) * FROM [50 Things All SQL Server Developers Need To Know] Aaron Bertrand, Senior Consultant SQL Sentry, LLC Thank You Presenting Sponsors Gain insights through familiar tools while balancing

More information

Sql Server 'create Schema' Must Be The First Statement In A Query Batch

Sql Server 'create Schema' Must Be The First Statement In A Query Batch Sql Server 'create Schema' Must Be The First Statement In A Query Batch ALTER VIEW must be the only statement in batch SigHierarchyView) WITH SCHEMABINDING AS ( SELECT (Sig). I'm using SQL Server 2012.

More information

Sepand Gojgini. ColumnStore Index Primer

Sepand Gojgini. ColumnStore Index Primer Sepand Gojgini ColumnStore Index Primer SQLSaturday Sponsors! Titanium & Global Partner Gold Silver Bronze Without the generosity of these sponsors, this event would not be possible! Please, stop by the

More information

Column Stores vs. Row Stores How Different Are They Really?

Column Stores vs. Row Stores How Different Are They Really? Column Stores vs. Row Stores How Different Are They Really? Daniel J. Abadi (Yale) Samuel R. Madden (MIT) Nabil Hachem (AvantGarde) Presented By : Kanika Nagpal OUTLINE Introduction Motivation Background

More information

Super SQL Bootcamp. Price $ (inc GST)

Super SQL Bootcamp. Price $ (inc GST) 1800 ULEARN (853 276) www.ddls.com.au Super SQL Bootcamp Length 5 days Price $4730.00 (inc GST) Overview To help you succeed in looking after your SQL Server assets, DDLS has created a special event: The

More information

HYRISE In-Memory Storage Engine

HYRISE In-Memory Storage Engine HYRISE In-Memory Storage Engine Martin Grund 1, Jens Krueger 1, Philippe Cudre-Mauroux 3, Samuel Madden 2 Alexander Zeier 1, Hasso Plattner 1 1 Hasso-Plattner-Institute, Germany 2 MIT CSAIL, USA 3 University

More information

Reorganize and Rebuild Indexes in the Database

Reorganize and Rebuild Indexes in the Database Reorganize and Rebuild Indexes in the Database This topic describes how to reorganize or rebuild a fragmented index in SQL Server 2017 by using or. The SQL Server Database Engine automatically maintains

More information

6232A - Version: 1. Implementing a Microsoft SQL Server 2008 Database

6232A - Version: 1. Implementing a Microsoft SQL Server 2008 Database 6232A - Version: 1 Implementing a Microsoft SQL Server 2008 Database Implementing a Microsoft SQL Server 2008 Database 6232A - Version: 1 5 days Course Description: This five-day instructor-led course

More information

Database &.NET Basics: Take what you know about SQL and apply that to SOQL, SOSL, and DML in Apex.

Database &.NET Basics: Take what you know about SQL and apply that to SOQL, SOSL, and DML in Apex. Database &.NET Basics: Take what you know about SQL and apply that to SOQL, SOSL, and DML in Apex. Unit 1: Moving from SQL to SOQL SQL & SOQL Similar but Not the Same: The first thing to know is that although

More information

20761 Querying Data with Transact SQL

20761 Querying Data with Transact SQL Course Overview The main purpose of this course is to give students a good understanding of the Transact-SQL language which is used by all SQL Server-related disciplines; namely, Database Administration,

More information

CAST(HASHBYTES('SHA2_256',(dbo.MULTI_HASH_FNC( tblname', schemaname'))) AS VARBINARY(32));

CAST(HASHBYTES('SHA2_256',(dbo.MULTI_HASH_FNC( tblname', schemaname'))) AS VARBINARY(32)); >Near Real Time Processing >Raphael Klebanov, Customer Experience at WhereScape USA >Definitions 1. Real-time Business Intelligence is the process of delivering business intelligence (BI) or information

More information

KillTest *KIJGT 3WCNKV[ $GVVGT 5GTXKEG Q&A NZZV ]]] QORRZKYZ IUS =K ULLKX LXKK [VJGZK YKX\OIK LUX UTK _KGX

KillTest *KIJGT 3WCNKV[ $GVVGT 5GTXKEG Q&A NZZV ]]] QORRZKYZ IUS =K ULLKX LXKK [VJGZK YKX\OIK LUX UTK _KGX KillTest Q&A Exam : 70-447 Title : UPGRADE:MCDBA Skills to MCITP DB Admin by Using MS SQL 2005 Version : Demo 1 / 10 1.You are a professional level SQL Server 2005 database administrator in an international

More information

Designing dashboards for performance. Reference deck

Designing dashboards for performance. Reference deck Designing dashboards for performance Reference deck Basic principles 1. Everything in moderation 2. If it isn t fast in database, it won t be fast in Tableau 3. If it isn t fast in desktop, it won t be

More information

Guide to Database Corruption

Guide to Database Corruption Guide to Database Corruption Table of Contents 1. Introduction... 4 2. Page and Object Allocation Storage Concepts... 4 2.1 Object Allocation Map... 5 2.2 Linkage... 5 3. Table Consistency DBCC Commands...

More information

It Depends. Database administration for developers

It Depends. Database administration for developers It Depends Database administration for developers About Me Email: maggiepint@gmail.com https://www.tempworks.com www.maggiepint.com Slide Share: http://www.slideshare.net/ MaggiePint Stuff your DBA Does!

More information

Review of Storage and Indexing

Review of Storage and Indexing Review of Storage and Indexing CMPSCI 591Q Sep 17, 2007 Slides adapted from those of R. Ramakrishnan and J. Gehrke 1 File organizations & access methods Many alternatives exist, each ideal for some situations,

More information

Synergetics-Standard-SQL Server 2012-DBA-7 day Contents

Synergetics-Standard-SQL Server 2012-DBA-7 day Contents Workshop Name Duration Objective Participants Entry Profile Training Methodology Setup Requirements Hardware and Software Requirements Training Lab Requirements Synergetics-Standard-SQL Server 2012-DBA-7

More information

Column-Oriented Database Systems. Liliya Rudko University of Helsinki

Column-Oriented Database Systems. Liliya Rudko University of Helsinki Column-Oriented Database Systems Liliya Rudko University of Helsinki 2 Contents 1. Introduction 2. Storage engines 2.1 Evolutionary Column-Oriented Storage (ECOS) 2.2 HYRISE 3. Database management systems

More information

Create View With Schemabinding In Sql Server 2005

Create View With Schemabinding In Sql Server 2005 Create View With Schemabinding In Sql Server 2005 to a Table. Issues with schema binding, view indexing looking for? Browse other questions tagged sql-server sql-server-2005 or ask your own question. You

More information