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

  • 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

  • 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

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • 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.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • 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

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • 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
  • 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

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • 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

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • 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.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • 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

  • 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

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Thanks Grant, i shall have a read!

    Doodles

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply