Skip to main content
SUBMITTED

Partitions and Clustered Columnstore Indexes

  • March 14, 2024
  • 7 replies
  • 67 views

Forum|alt.badge.img

We have several tables that are quite large. We are attempting to add both partitions and clustered columnstore indexes to make the data more manageable. 

This is not only possible but is recommended by Microsoft for certain use cases. However, enabling both partitions and clustered columnstore indexes appears to be impossible in our current version of TimeXtender, 20.10.29.

Attempting to do so produces a message saying that SQL Server does not support the combination of these two features, which, as previously mentioned, is not true. 

Can anyone shed some light on this? 

7 replies

Christian Hauggaard
Community Manager
Forum|alt.badge.img+5

Hi @ekw9 can you please share screenshots of the table settings for the relevant tables? Which version of SQL Server are you using?


Forum|alt.badge.img
  • Author
  • Contributor
  • March 15, 2024

Hi Christian, 

Thank you for your reply! We are using SQL Server 2019 Enterprise, although we will be upgrading to SQL Server 2022 (and upgrading TimeXtender to the most recent legacy version as well) very shortly. 

Screenshots follow below. Allow me to correct myself - the error messages do not specify that SQL Server does not allow CCIs and partitions to be used together, but it does stop them from being used together regardless. 

Below, please find the following images: table settings, the error when you first create a partition and then create a CCI, and the error when you create a CCI but then attempt to create a partition. The tables that we are working with are query tables, but the issue affects normal tables as well. 

 

Error when creating a CCI index with the above settings
Error when removing the partition, adding a CCI, and attempting to add the partition back in again

 


Thomas Lind
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • March 18, 2024

Hi Emily

I got this from the developers.

The reason it is not allowed is because of the way TimeXtender do partitioning. We create a computed column called "DW_PartitionKey" when partition is added to a table.

If you after deploying the table with partitioning try to apply the clustered column stored index to the table in eg. SSMS, SQL Server will error with:

The statement failed because column 'DW_PartitionKey' on table 'YourTableName' is a computed column. Columnstore index cannot include a computed column implicitly or explicitly.

 


Forum|alt.badge.img
  • Author
  • Contributor
  • March 18, 2024

Hi Thomas,

Thank you and the development staff for your response. 

To clarify, you are saying that we cannot use a CCI and partitioning at the same time - a common, important combination of SQL Server features for handling large data sets - because of a quirk in how that feature was implemented in TimeXtender. Is that accurate? 

If that is the case, is there any estimate on when this issue might be fixed? 


Thomas Lind
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • March 18, 2024

Hi Emily

You are right about it being about how the partition is made. If I remember there is another thing where it does not split out the partitions across filegroups, which is another reason for doing this.

Essentially this features main use is for doing OLAP incremental load.

I would suggest you to make a idea for a change of this, so it continues to benefit executions, queries and so.


Christian Hauggaard
Community Manager
Forum|alt.badge.img+5

Hi @ekw9 

I have converted this to an idea


Forum|alt.badge.img
  • Author
  • Contributor
  • March 30, 2024

Thank you Christian!

I believe this is an important feature for TimeXtender to support. In a world where data is getting bigger and bigger every year, a product like TimeXtender should allow developers to use every tool available to make the data easier to query and transform.