explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pMtF

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=1,191,097.56..1,199,445.60 rows=201 width=556) (actual rows= loops=)

  • Group Key: a."CHANNEL
  • Group Key: ()
  • Functions: 22
2.          

CTE myvars

3. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=16) (actual rows= loops=)

4.          

CTE ___base

5. 0.000 0.000 ↓ 0.0

Gather (cost=1,000.04..1,067,457.30 rows=202,473 width=415) (actual rows= loops=)

  • Workers Planned: 2
  • Params Evaluated: $1, $2
6.          

Initplan (forGather)

7. 0.000 0.000 ↓ 0.0

CTE Scan on myvars (cost=0.00..0.02 rows=1 width=8) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

CTE Scan on myvars myvars_1 (cost=0.00..0.02 rows=1 width=8) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on scn_baseline_2 ___base (cost=0.00..1,046,209.96 rows=84,364 width=415) (actual rows= loops=)

  • Filter: (("STARTTIME" >= $1) AND ("STARTTIME" <= $2))
10.          

CTE a

11. 0.000 0.000 ↓ 0.0

HashAggregate (cost=94,149.95..121,787.10 rows=20,247 width=588) (actual rows= loops=)

  • Group Key: ___base_1."WEEKLY", ___base_1."MONTHLY", ___base_1."QUARTERLY", ___base_1."YEARLY", ___base_1."CHANNEL
12. 0.000 0.000 ↓ 0.0

CTE Scan on ___base ___base_1 (cost=0.00..4,049.46 rows=202,473 width=276) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Sort (cost=1,853.15..1,903.77 rows=20,247 width=338) (actual rows= loops=)

  • Sort Key: a."CHANNEL
14. 0.000 0.000 ↓ 0.0

CTE Scan on a (cost=0.00..404.94 rows=20,247 width=338) (actual rows= loops=)