How can I fix performance not improving when querying a partitioned table?

Efstathiadou Androniki 5 Reputation points
2023-08-16T07:02:17.46+00:00

Hello,

I need some help with partitioned tables in Dedicated SQL Pool.
Here are some details: Pool performance level is Gen2: DW300c. I have a large (67 columns) distributed Hash table with CLUSTERED_COLUMNSTORE index. The distribution column has been chosen according to design considerations and there is no data skew (Skewed Table Percentage: 0.18822). The table size is 214,680,458 rows and the data per year is as follows:
PYear   NoRows

2016    8,928

2017    20,890,081

2018    103,877

2019    141,308

2020    14,560,292

2021    58,548,703

2022    75,665,750

2023    44,080,789

I have created a new Partitioned table with the same structure as the non-partitioned table (Hash Distributed including clustered columnstore). Partitions are created on a datetime column using CTAS statement and right range partitioning strategy. Following this, I executed the UPDATE statistics command. The number of rows per partition is:
Partition 1 (2016-2020): 35,704,486

Partition 2 (2021): 58,548,703

Partition 3 (2022): 75,665,750

Partition 4 (2023): 44,080,789
The table skew percentage to the partitioned table is 53.00877.

I ran the same query in both tables. In partitioned table I use the partitioned column as a filter (WHERE clause). Unfortunately, there is no improvement in the execution time in the query with partitioned table. The execution time in both queries was the same.
 Also, I have tried to create a new workload group (wgUserQueries), with more resources to handle the queries, but that didn't make any difference either. I have advised best practices for partitioning tables and tuning queries. I have tried different combinations for indexes (clustered and non-clustered) but the issue still exists. In the execution plan, there is a 100% cost in the BroadcastMoveOperation."

Please advise what is happening and why there is no improvement after switching to partition table and what else should I consider?

Thank you!

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.
{count} votes

Your answer

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