gianm commented on issue #7955: About the performance of select * from xxx limit 1 URL: https://github.com/apache/incubator-druid/issues/7955#issuecomment-505495246 @Kiddinglife `select * from xxx limit 1` would run quickly: essentially what it will do is pick some segment, pull the first row out, and return it to you. Note that adding an `order by __time` or `order by __time desc` would slow it down in current versions of Druid, though. https://github.com/apache/incubator-druid/pull/7133 speeds up select-with-time-ordering dramatically and will be available in 0.15.0 (due to be released soon). That being said, for your stated desires, it would be even better to use specific APIs for those two things. 1. For all field names, use the INFORMATION_SCHEMA: https://druid.apache.org/docs/latest/querying/sql.html#retrieving-metadata 2. For the most-recent data timestamp, use a timeBoundary native query: https://druid.apache.org/docs/latest/querying/timeboundaryquery.html Both of these are highly optimized and will be even faster than doing a limited select query.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
