Hi,
I'm working on the issue-1281(https://github.com/apache/incubator-iotdb/issues/1281). I plan to add a sub clause in show timeseries syntax, like: SHOW TIMESERIES prefixPath? showWhereClause? orderByHeatClause? limitClause? The 'orderByHeatClause' is added to support this feature. The detailed syntax is: orderByHeatClause : ORDER BY HEAT ; It's an optional clause, if user doesn't specify it. The action of 'show timeseries' will just be like before, the result set is sorted by the registered time of the time series. If it is specified, firstly we will obtain all the satisfying timeseries as before, then we will sort them by the last point's timestamp. That means if the timeseries is inserted recently, it will be shown in the front. In the implementation, as we have got the LeafMNode before, so we can use the cachedLastValuePair field in it to get last timestamp, if the cachedLastValuePair is null, we will construct a LastQueryPlan to get it. Best, --------------- Yuan Tian