Hi Yuan, Thanks for the great feature and optimization! The ORDER BY TIMESERIES support and optimized OFFSET clause will greatly benefit our automated testing. Deterministic sorting lets us design more reliable test cases. We’ll upgrade our test suite to leverage these capabilities, enhancing IoTDB’s quality. Great work on the PR!
Best regards, Qingxin Feng ________________________________ 发件人: [email protected] <[email protected]> 发送时间: 2026年1月26日 20:26 收件人: [email protected] <[email protected]> 主题: Support for ORDER BY TIMESERIES in SHOW TIMESERIES and OFFSET optimization Hi all, I would like to introduce a new feature and optimization regarding metadata queries. We have implemented support for the `ORDER BY TIMESERIES` clause in `SHOW TIMESERIES` statements. This allows users to retrieve timeseries results sorted lexicographically by measurement name, with support for both ascending and descending order. Along with this sorting capability, we have significantly optimized the performance of the `OFFSET` clause. Previously, skipping records required traversing them one by one. With this update, we now utilize in-memory subtree measurement statistics to skip entire subtrees during traversal. This improvement drastically reduces the cost of large offsets, changing the complexity from linear relative to the offset to being proportional to the tree height. The update also adjusts the logical plan to support global ordering across partitions and fixes a previous issue with limit handling in multi-partition queries. You can review the changes here: https://github.com/apache/iotdb/pull/17065 Best regards, -------------------- Yuan Tian
