Documentation

Partitioning best practices

Use the following best practices when defining custom partitioning strategies for your data stored in InfluxDB Cloud Dedicated.

Partition by tags that you commonly query for a specific value

Custom partitioning primarily benefits queries that look for a specific tag value in the WHERE clause. For example, if you often query data related to a specific ID, partitioning by the tag that stores the ID helps the InfluxDB query engine to more quickly identify what partitions contain the relevant data.

Use tag buckets for high-cardinality tags

Partitioning using distinct values of tags with many (10K+) unique values can actually hurt query performance as partitions are created for each unique tag value. Instead, use tag buckets to partition by high-cardinality tags. This method of partitioning groups tag values into “buckets” and partitions by bucket.

Only partition by tags that always have a value

You should only partition by tags that always have a value. If points don’t have a value for the tag, InfluxDB can’t store them in the correct partitions and, at query time, must read all the partitions.

Avoid over-partitioning

As you plan your partitioning strategy, keep in mind that data can be “over-partitioned”–meaning partitions are so granular that queries end up having to retrieve and read many partitions from the object store, which hurts query performance.

  • Balance the partition time interval with the actual amount of data written during each interval. If a single interval doesn’t contain a lot of data, it is better to partition by larger time intervals.
  • Don’t partition by tags that you typically don’t use in your query workload.
  • Don’t partition by distinct values of high-cardinality tags. Instead, use tag buckets to partition by these tags.

Was this page helpful?

Thank you for your feedback!


The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Read more

InfluxDB v3 enhancements and InfluxDB Clustered is now generally available

New capabilities, including faster query performance and management tooling advance the InfluxDB v3 product line. InfluxDB Clustered is now generally available.

InfluxDB v3 performance and features

The InfluxDB v3 product line has seen significant enhancements in query performance and has made new management tooling available. These enhancements include an operational dashboard to monitor the health of your InfluxDB cluster, single sign-on (SSO) support in InfluxDB Cloud Dedicated, and new management APIs for tokens and databases.

Learn about the new v3 enhancements


InfluxDB Clustered general availability

InfluxDB Clustered is now generally available and gives you the power of InfluxDB v3 in your self-managed stack.

Talk to us about InfluxDB Clustered