kudu-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Heo <jason.heo....@gmail.com>
Subject How to manage yearly range partition efficiently
Date Thu, 08 Jun 2017 02:44:48 GMT
Hi.

This is a partition strategy of my table.

PARTITION BY HASH (...) PARTITIONS 40,
RANGE (ymd) (
    PARTITION VALUES < "2015",
    PARTITION "2015" <= VALUES < "2016",
    PARTITION "2016" <= VALUES < "2017",
    PARTITION "2017" <= VALUES
)

My concern is that how to manage RANGE(ymd) partitions for greather than
2017.

plan 1) using a cron job, add 2018 partition at the end of 2017, add 2019
partition at the end of 2018, ...
    - pros: no unused partitions
    - cons: problems arise if next year's partition is not created by
mistake
plan 2) add all upcoming 10 years' partitions
    - pros: can reduce risks
    - cons: 400 partitions (40*10 years) are created but they has no data

I prefer to plan 2) but I'm wondering what many unnecessarily partitions
lead to problems.

Any suggestion?

Regards,

Jason

Mime
View raw message