Logfire tackled painfully slow queries over OpenTelemetry data by changing how semi-structured attributes are stored and queried. Initially attributes were kept as a single JSON column in Parquet and parsed with the fast Jiter parser, which still forced heavy I/O, poor compression, and expensive JSON parsing whenever queries touched unshredded keys. A prior optimization - static shredding - extracted a small, hardcoded set of common attributes into strongly typed Parquet columns (with _lf_attributes prefixes) so those predicates could benefit from columnar reads and zone-map pruning. That helped some queries but was inflexible, visible to users, added storage overhead for mostly-null columns, and left many predicates paying the full JSON scan cost.
The new approach, dynamic shredding, automatically extracts the most frequently accessed attributes into separate typed columns during ingestion and compaction with no user configuration, preserving the logical JSON view while optimizing the physical layout. By enabling predicate pushdown, min/max pruning, and much smaller column scans, this reduces object-storage downloads and CPU parsing dramatically; queries that previously timed out (30s) now complete in under a second in some cases, with reported speedups up to ~1,000x. The change keeps Parquet for storage, rewrites JSON attribute predicates to use shredded columns when available, and will be rolled out to customers starting February 2026.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.