kfaraz commented on PR #19685:
URL: https://github.com/apache/druid/pull/19685#issuecomment-4980935017

   A query like the following would help though:
   
   ```sql
   SELECT `start`, `end`
     FROM (                                                                     
                                              
         SELECT `start`, `end`
         FROM druid_segments
         WHERE dataSource = 'transactions'
         AND used = FALSE                                                       
                                              
         LIMIT 1000000
     ) AS unused_segments
     GROUP BY `start`, `end`
     LIMIT 10000
   ```
   
   Here, we limit the rows scanned for that datasource to 1M (which affects 
perf)
   and limit the final result to 10k rows (which only affects the size of the 
results streamed back to the client).
   
   This query gives me consistently good perf of ~2s on the same data.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to