SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Columnstore Indexes - do we need to perform any maintenance on them?


Columnstore Indexes - do we need to perform any maintenance on them?

Author
Message
doodlingdba
doodlingdba
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2702 Visits: 773
Hi all
Our devs are about to implement columnstore indexes on a couple of their DBs. I've been thinking about what maintenance might be required to maintain them. We use Ola Hallengren's IndexOptimize proc for index maintenance, but it appears to be excluding ColumnStore indexes. I've come across some articles that suggest there is some maintenance to be done, e.g.
https://blog.greglow.com/2015/01/10/rebuild-clustered-columnstore-indexes-when-they-require-maintenance/

But also another where there is nothing to be done:
https://www.dcac.com/blog/database-maintenance-and-columnstore-indexes

Anyone with Columnstore index experience care to share what you are currently doing for maintenance, if anything?

Thanks!
Doodles
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)

Group: General Forum Members
Points: 374845 Visits: 34636
You are going to want to rebuild columnstore indexes on some sort of basis. This does two things. It helps to condense the columns down so that the compression works best. Also, it gets rid of all the data in the delta stores, again, improving compression and overall performance. Also, keep the statistics up to date.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
Product Evangelist for Red Gate Software
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)

Group: General Forum Members
Points: 934651 Visits: 49053
Grant Fritchey - Friday, February 8, 2019 6:47 AM
You are going to want to rebuild columnstore indexes on some sort of basis. This does two things. It helps to condense the columns down so that the compression works best. Also, it gets rid of all the data in the delta stores, again, improving compression and overall performance. Also, keep the statistics up to date.


Is there a measurement that can be taken on such things to determine when rebuilding columnstore indexes would actually benefit from a rebuild?

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

When you put the right degree of spin on it, the number 318 is also a glyph that describes the nature of a DBAs job. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)

Group: General Forum Members
Points: 374845 Visits: 34636
Jeff Moden - Friday, February 8, 2019 9:36 AM


Is there a measurement that can be taken on such things to determine when rebuilding columnstore indexes would actually benefit from a rebuild?


Yes. Here's an article introducing it.

The goal is to have an even distribution of rows across the total_rows.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
Product Evangelist for Red Gate Software
Luis Cazares
Luis Cazares
SSC Guru
SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)SSC Guru (172K reputation)

Group: General Forum Members
Points: 172422 Visits: 23044
Grant Fritchey - Friday, February 8, 2019 11:53 AM
Jeff Moden - Friday, February 8, 2019 9:36 AM


Is there a measurement that can be taken on such things to determine when rebuilding columnstore indexes would actually benefit from a rebuild?


Yes. Here's an article introducing it.

The goal is to have an even distribution of rows across the total_rows.

Did you forget the article?



Luis C.
General Disclaimer:
Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?


How to post data/code on a forum to get the best help: Option 1 / Option 2
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)

Group: General Forum Members
Points: 374845 Visits: 34636
Luis Cazares - Friday, February 8, 2019 12:01 PM
Grant Fritchey - Friday, February 8, 2019 11:53 AM
Jeff Moden - Friday, February 8, 2019 9:36 AM


Is there a measurement that can be taken on such things to determine when rebuilding columnstore indexes would actually benefit from a rebuild?


Yes. Here's an article introducing it.

The goal is to have an even distribution of rows across the total_rows.

Did you forget the article?


Ooops. Give me a sec.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
Product Evangelist for Red Gate Software
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)

Group: General Forum Members
Points: 374845 Visits: 34636
Luis Cazares - Friday, February 8, 2019 12:01 PM

Did you forget the article?

Updated it.


----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
Product Evangelist for Red Gate Software
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)SSC Guru (934K reputation)

Group: General Forum Members
Points: 934651 Visits: 49053
Thanks, Grant. Dmitri's article is going to take me some time to digest because I don't use column store... at least, not yet.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

When you put the right degree of spin on it, the number 318 is also a glyph that describes the nature of a DBAs job. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
doodlingdba
doodlingdba
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2702 Visits: 773
Thanks for response Grant. I've not used ColumnStore Indexes before and taking a while to wrap my head around it.

My next question is - any DBAs out there who have configured maintenance jobs for ColumnStore indexes and wish to share their insights? Is there something standard that we can implement?

Thanks
Doodles
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)SSC Guru (374K reputation)

Group: General Forum Members
Points: 374845 Visits: 34636
doodlingdba - Monday, February 11, 2019 3:02 AM
Thanks for response Grant. I've not used ColumnStore Indexes before and taking a while to wrap my head around it.

My next question is - any DBAs out there who have configured maintenance jobs for ColumnStore indexes and wish to share their insights? Is there something standard that we can implement?

Thanks
Doodles


The single greatest resource on Columnstore apart from what Microsoft offers (and that is pretty good) is Niko Negebauer. Here is his 127 part (and growing) series on the topic. More information than you can shake a stick at. We also have some very good articles here on SQL Server, specifically in the Stairways series. I'd suggest going there too.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
Product Evangelist for Red Gate Software
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum









































































































































































SQLServerCentral


Search