explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2YVT

Settings
# exclusive inclusive rows x rows loops node
1. 138.665 37,913.373 ↑ 1.0 8,200 1

Finalize GroupAggregate (cost=62,072.14..64,877.31 rows=8,440 width=1,160) (actual time=30,614.921..37,913.373 rows=8,200 loops=1)

  • Group Key: scenario.config, fact_user_revenue.dim_date_activity
2. 3,887.243 37,774.708 ↓ 1.5 24,600 1

Gather Merge (cost=62,072.14..64,497.51 rows=16,880 width=1,136) (actual time=30,614.312..37,774.708 rows=24,600 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 1,614.448 33,887.465 ↑ 1.0 8,200 3 / 3

Partial GroupAggregate (cost=61,072.11..61,549.11 rows=8,440 width=1,136) (actual time=27,926.125..33,887.465 rows=8,200 loops=3)

  • Group Key: scenario.config, fact_user_revenue.dim_date_activity
4. 30,695.427 32,273.017 ↓ 9.6 178,760 3 / 3

Sort (cost=61,072.11..61,118.55 rows=18,575 width=1,112) (actual time=27,925.648..32,273.017 rows=178,760 loops=3)

  • Sort Key: scenario.config, fact_user_revenue.dim_date_activity
  • Sort Method: external merge Disk: 161600kB
5. 81.978 1,577.590 ↓ 9.6 178,760 3 / 3

Hash Join (cost=30,144.30..50,739.05 rows=18,575 width=1,112) (actual time=844.348..1,577.590 rows=178,760 loops=3)

  • Hash Cond: (fact_user_revenue.scenario_id = scenario.id)
6. 506.663 1,495.563 ↓ 1.8 235,738 3 / 3

Hash Join (cost=30,128.39..50,285.65 rows=131,759 width=28) (actual time=803.019..1,495.563 rows=235,738 loops=3)

  • Hash Cond: ((fact_user_revenue.scenario_id = fdau.scenario_id) AND (fact_user_revenue.dim_date_activity = fdau.dim_date) AND (fact_user_revenue.dim_ramp_segment_id = fdau.dim_ramp_segment_id))
7. 187.965 187.965 ↑ 1.2 235,738 3 / 3

Parallel Seq Scan on fact_user_revenue (cost=0.00..9,662.73 rows=294,672 width=28) (actual time=1.675..187.965 rows=235,738 loops=3)

8. 388.621 800.935 ↑ 1.0 707,214 3 / 3

Hash (cost=13,608.14..13,608.14 rows=707,214 width=20) (actual time=800.935..800.935 rows=707,214 loops=3)

  • Buckets: 65536 Batches: 16 Memory Usage: 2642kB
9. 412.314 412.314 ↑ 1.0 707,214 3 / 3

Seq Scan on fact_daily_active_users fdau (cost=0.00..13,608.14 rows=707,214 width=20) (actual time=1.270..412.314 rows=707,214 loops=3)

10. 0.007 0.049 ↑ 1.0 5 3 / 3

Hash (cost=15.85..15.85 rows=5 width=1,096) (actual time=0.049..0.049 rows=5 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
11. 0.016 0.042 ↑ 1.0 5 3 / 3

Bitmap Heap Scan on scenario (cost=4.17..15.85 rows=5 width=1,096) (actual time=0.035..0.042 rows=5 loops=3)

  • Recheck Cond: ((product_id)::text = '00u32ewyu5dZCMS7n357'::text)
  • Heap Blocks: exact=10
12. 0.026 0.026 ↓ 2.2 11 3 / 3

Bitmap Index Scan on scenario_product_id_idx (cost=0.00..4.17 rows=5 width=0) (actual time=0.026..0.026 rows=11 loops=3)

  • Index Cond: ((product_id)::text = '00u32ewyu5dZCMS7n357'::text)
Planning time : 1.660 ms
Execution time : 37,977.785 ms