Discouraged Schema Design

Tags that specify highly variable information like UUIDs, hashes, and random strings can increase your series cardinality to uncomfortable levels.
If you need that information in your database, consider storing the high-cardinality data as a field rather than a tag (note that query performance will be slower).

Don’t differentiate data with measurement names

In general, taking this step will simplify your queries.
InfluxDB queries merge data that fall within the same measurement; it’s better to differentiate data with tags than with detailed measurement names.

Example:

Schema 1

Schema 2

Measurement:blueberries.field-1.region-north

Measurement:blueberries; Tags:field = 1 and region = north

Measurement:blueberries.field-2.region-midwest

Measurement:blueberries; Tags:field = 2 and region = midwest

Assume that each measurement contains a single field key called value.
The following queries calculate the average of value across all fields and all regions.
Notice that, even at this small scale, this is harder to do under Schema 1.

Similar to the point above, taking this step will simplify your queries.
It will reduce your need for regular expressions.

Example:

Tagset 1

Tagset 2

location = field-1.region-north

field = 1 and region = north

location = field-2.region-north

field = 2 and region = north

location = field-2.region-midwest

field = 2 and region = midwest

Assume that each tag set falls in the measurementblueberries and is associated with a field called value.
The following queries calculate the average of value for blueberries that fall in the north.
While both queries are relatively simple, you can imagine that the regex could get much more complicated if Schema 1 contained a more complex tag value.

Schema 1

> SELECT mean(value) FROM blueberries WHERE location =~ /north/

Schema 2

> SELECT mean(value) FROM blueberries WHERE region = 'north'

Don’t use the same name for a field key and tag key

You won’t be able to query the tag key if the tag key is the same as a field key in your schema.
Be sure to differentiate your tag keys and field keys.