Skip to content

Commit 588a5e8

Browse files
committed
docs: EXPLAIN ANALYZE DETAILED for Cube Store query tracing (follow-up to #11016)
1 parent 5447f30 commit 588a5e8

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

docs-mintlify/docs/pre-aggregations/using-pre-aggregations.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,16 @@ used for query processing:
874874
+-----------+-----------------+--------------------------------------------------------------------------------------------------------------------------+
875875
```
876876

877+
Unlike `EXPLAIN` and `EXPLAIN ANALYZE`, which only show the plan, `EXPLAIN ANALYZE
878+
DETAILED` actually executes the query under per-query tracing and renders a
879+
detailed execution trace as a tree with a per-category timing summary. Use it to
880+
diagnose where time is spent within a query:
881+
882+
```sql
883+
EXPLAIN ANALYZE DETAILED SELECT orders__platform, sum(orders__count) FROM dev_pre_aggregations.orders_general_o32v4dvq_vbyemtl2_1h5hs8r
884+
GROUP BY orders__platform;
885+
```
886+
877887
When you're debugging performance, one thing to keep in mind is that Cube Store, due to its design, will always use some index to query data, and usage of the index itself doesn't necessarily tell if the particular query is performing optimally or not.
878888
What's important to look at is aggregation and partition merge strategies.
879889
In most of the cases for aggregation, Cube Store will use `HashAggregate` or `InplaceAggregate` strategy as well as `Merge` and `MergeSort` operators to merge different partitions.

0 commit comments

Comments
 (0)