suneet-s commented on a change in pull request #10413:
URL: https://github.com/apache/druid/pull/10413#discussion_r493782020
##########
File path: docs/querying/sql.md
##########
@@ -1108,6 +1108,18 @@ GROUP BY 1
ORDER BY 2 DESC
```
+If you want to retrieve segment that was compacted (ANY compaction):
+
+```sql
+SELECT * FROM sys.segments WHERE last_compaction_state is not null
+```
+
+or if you want to retrieve segment that was compacted only by a particular
compaction spec (such as that of the auto compaction):
Review comment:
```suggestion
Sometimes, you may have updated your compaction spec to a more optimal spec.
In these cases you can find which segments are using the latest compaction spec
using a query like the one below:
```
Can you also add instructions on how to produce the `last_compaction_state`
blob from the web console. If I'm looking at the compaction config for a
datasource - can I copy something to paste in the where clause here?
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]