Enabling auto update statistics for a Synapse dedicated SQL pool

pmscorca 987 Reputation points
2024-03-16T16:36:10.9533333+00:00

Hi,

I'd like if and when it is proper to enable the auto update statistics option for a Synapse dedicated SQL pool.

Thanks

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,858 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Azar 22,860 Reputation points MVP
    2024-03-16T17:42:17.5233333+00:00

    Hey there pmscorca

    Thats a good question and thanks for using QandA platform

    So enabling auto-update statistics in Azure Synapse Analytics is good for maintaining query performance.

    But, whether you should enable this option depends on lott of factors such as the type of ur workload, the frequency of data changes, and the performance and requirements of your queries and etc. so I say it totally depends.

    If this helps kindy accept the answer thank much.


  2. Harishga 5,990 Reputation points Microsoft Vendor
    2024-03-18T10:55:52.18+00:00

    Hi @pmscorca
    Welcome to Microsoft Q&A platform and thanks for posting your question here.

    In Azure Synapse Analytics, statistics are used by the query optimizer to estimate the number of rows in a query result. This estimation is important because it helps the system create a plan to make the query run faster. The query optimizer uses statistics to determine the best way to retrieve data from tables and indexes, and to join tables together.

    By default, statistics are updated automatically when a table's data changes by 20% or more. This means that if a table has 100,000 rows, statistics will be updated automatically when the table's data changes by 20,000 rows or more. However, you can choose to update statistics more frequently by turning on the "auto update statistics" option. This option ensures that statistics are always up-to-date and can help queries run faster. 

    Enabling auto update statistics for Synapse dedicated SQL pools is recommended as it helps to keep the statistics up-to-date and ensures that queries run efficiently. For very large tables with many columns and statistics, it may be better to update only the necessary statistics to save time and resources.

    Reference
    https://video2.skills-academy.com/en-us/azure/synapse-analytics/sql/develop-tables-statistics
    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.