2 ms·
It's a nice index structure with a metric name as a part of a key value. It allows to skip must have optimizations (like bitmap indexes or parallel index scans)
by bvrmn 2y ago
It's a nice index structure with a metric name as a part of a key value. It allows to skip must have optimizations (like bitmap indexes or parallel index scans) in case of regular structure where metric name is also a tag. It kinda shards indexes and makes per tag id-set a lot smaller.
I'm now thinking about employing the same structure for hisser[1]. Now it uses a regular index structure and quite complex parallel index scan on top of lmdb[2].
[1]: https://github.com/baverman/hisser https://github.com/baverman/hisser
[2]: https://github.com/baverman/hisser/blob/master/hisser/lmdb_scan/lmdb_scan.c#L105 https://github.com/baverman/hisser/blob/master/hisser/lmdb_s...
- bvrmn 2y agoAnother good property: it's trivial to make tag value autocompletion in query builder. A regular structure forces to partially evaluate a query to get meaningful results. With a metric prefix index it could be perfectly fine to return full scan results.