4 ms·
I believe hendzen was referring to using partition on a table in mysql. Mariadb has an example walkthrough on this: https://mariadb.com/kb/en/library/partition
by Shelnutt2 9y ago
I believe hendzen was referring to using partition on a table in mysql.
Mariadb has an example walkthrough on this: https://mariadb.com/kb/en/library/partition-maintenance/#partition-maintenance-for-the-time-series-case https://mariadb.com/kb/en/library/partition-maintenance/#par... .
The only change that I'd recommend considering, is we use partition by list, instead of range, and keep a weeks worth of daily future partitions. This makes it so you don't have to reorganize the table. On the other hand it means if you get future data it can fail and if your partition jobs have issues for a week you can fail to load data all together.
Using partitions for time series data help also due to partition pruning, https://dev.mysql.com/doc/refman/5.7/en/partitioning-pruning.html https://dev.mysql.com/doc/refman/5.7/en/partitioning-pruning... .
- markpapadakis 9y agoThank you -- we didn't use table partitioning because we didn't have good results in the past, though we should probably have tried it, and maybe it'd have worked well. We just kind of gave up on mySQL use for that specific problem after failing (again, maybe its entirely because of our inability to use mySQL "properly") to get good results and moved on to something else.