Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Azure Synapse Analytics Cookbook

You're reading from   Azure Synapse Analytics Cookbook Implement a limitless analytical platform using effective recipes for Azure Synapse

Arrow left icon
Product type Paperback
Published in Apr 2022
Publisher Packt
ISBN-13 9781803231501
Length 238 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Gaurav Agarwal(BLR) Gaurav Agarwal(BLR)
Author Profile Icon Gaurav Agarwal(BLR)
Gaurav Agarwal(BLR)
Meenakshi Muralidharan Meenakshi Muralidharan
Author Profile Icon Meenakshi Muralidharan
Meenakshi Muralidharan
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Chapter 1: Choosing the Optimal Method for Loading Data to Synapse 2. Chapter 2: Creating Robust Data Pipelines and Data Transformation FREE CHAPTER 3. Chapter 3: Processing Data Optimally across Multiple Nodes 4. Chapter 4: Engineering Real-Time Analytics with Azure Synapse Link Using Cosmos DB 5. Chapter 5: Data Transformation and Processing with Synapse Notebooks 6. Chapter 6: Enriching Data Using the Azure ML AutoML Regression Model 7. Chapter 7: Visualizing and Reporting Petabytes of Data 8. Chapter 8: Data Cataloging and Governance 9. Chapter 9: MPP Platform Migration to Synapse 10. Other Books You May Enjoy

Script for statistics in Synapse SQL

Once the data is loaded into a dedicated SQL pool, statistics collection from data is very important for continuous query optimization. The dedicated SQL pool query optimizer is a cost-based optimizer that compares query plans and chooses the plan with the lowest cost. The dedicated SQL pool engine will analyze incoming user queries where the statistics are constantly analyzed and the database AUTO_CREATE_STATISTICS option is set to ON. If the statistics are not available, then the query optimizer will create statistics on individual columns.

How to do it…

By default, statistics creation is turned on. Check the data warehouse configuration for AUTO_CREATE_STATISTICS using the following command:

SELECT name, is_auto_create_stats_on
FROM sys.databases

Enable statistics with the following command:

ALTER DATABASE <datawarehousename>
SET AUTO_CREATE_STATISTICS ON

Once the statistics command is received, it will trigger...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image