Company
Date Published
Author
Nga Tran
Word count
2324
Language
English
Hacker News points
None

Summary

InfluxDB 3.0 supports two query languages, SQL and InfluxQL, which generate logical and physical plans according to the instructions of a query plan. The physical plan is specific to the data and cluster configuration. Understanding a query plan can help explain why a query is slow, such as reading many files, and techniques for making a query run faster depend on the reason(s) it is slow. A large query plan may look intimidating but can be quickly understood by following steps from the bottom up, understanding the job of each Execnode, recalling input data characteristics, considering output data size, and estimating work done. Tools like EXPLAIN ANALYZE and Jaeger can provide exact runtime information for each ExecutionPlan. The physical plan consists of ParquetExec, RecordBatchesExec, FilterExec, CoalesceBatchesExec, SortExec, UnionExec, RepartitionExec, AggregateExec, and DeduplicateExec nodes, which perform various operations such as deduplication, filtering, sorting, and merging data streams.