explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OC9q

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 23,770.282 ↑ 1.0 1 1

Finalize Aggregate (cost=3,152,920.46..3,152,920.56 rows=1 width=8) (actual time=23,770.282..23,770.282 rows=1 loops=1)

  • Buffers: shared hit=5828 read=129527
2. 29.663 23,770.932 ↑ 1.5 6 1

Gather (cost=450,417.26..3,152,920.24 rows=9 width=8) (actual time=5.542..23,770.932 rows=6 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
  • Buffers: shared hit=5828 read=129527
3. 0.000 23,741.269 ↑ 1.5 2 4

Parallel Append (cost=450,416.26..3,152,919.24 rows=3 width=8) (actual time=17,800.637..23,741.269 rows=2 loops=4)

  • Buffers: shared hit=5828 read=129527
4. 4,866.047 23,740.626 ↑ 1.0 1 4

Partial Aggregate (cost=2,252,086.27..2,252,086.37 rows=1 width=8) (actual time=23,740.626..23,740.626 rows=1 loops=4)

  • Buffers: shared hit=5826 read=129527
5. 12,126.798 18,874.579 ↑ 1.3 6,250,000 4

Parallel Hash Join (cost=1.20..2,050,472.07 rows=8,064,568 width=4) (actual time=1.023..18,874.579 rows=6,250,000 loops=4)

  • Hash Cond: (f_1.time_key = d_1.time_key)
  • Buffers: shared hit=5826 read=129527
6. 6,747.730 6,747.730 ↑ 1.3 6,250,000 4

Parallel Seq Scan on f_1 (cost=0.00..941,592.77 rows=8,064,568 width=4) (actual time=0.196..6,747.730 rows=6,250,000 loops=4)

  • Buffers: shared hit=5609 read=129527
7. 0.043 0.051 ↓ 0.0 0 4

Parallel Hash (cost=1.07..1.07 rows=1 width=4) (actual time=0.051..0.051 rows=0 loops=4)

  • Buckets: 1024 Batches: 1 Memory Usage: 40kB
  • Buffers: shared hit=1
8. 0.008 0.008 ↑ 1.0 1 1

Parallel Seq Scan on d_1 (cost=0.00..1.07 rows=1 width=4) (actual time=0.006..0.008 rows=1 loops=1)

  • Filter: (month = 1)
  • Buffers: shared hit=1
9. 0.003 0.036 ↑ 1.0 1 1

Partial Aggregate (cost=450,416.26..450,416.36 rows=1 width=8) (actual time=0.036..0.036 rows=1 loops=1)

  • Buffers: shared hit=1
10. 0.024 0.033 ↓ 0.0 0 1

Parallel Hash Join (cost=1.20..410,093.68 rows=1,612,903 width=4) (actual time=0.032..0.033 rows=0 loops=1)

  • Hash Cond: (f_2.time_key = d_2.time_key)
  • Buffers: shared hit=1
11. 0.000 0.000 ↓ 0.0 0

Parallel Seq Scan on f_2 (cost=0.00..188,318.32 rows=1,612,903 width=4) (never executed)

12. 0.001 0.009 ↓ 0.0 0 1

Parallel Hash (cost=1.07..1.07 rows=1 width=4) (actual time=0.009..0.009 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 0kB
  • Buffers: shared hit=1
13. 0.008 0.008 ↓ 0.0 0 1

Parallel Seq Scan on d_2 (cost=0.00..1.07 rows=1 width=4) (actual time=0.008..0.008 rows=0 loops=1)

  • Filter: (month = 1)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=1
14. 0.007 2.520 ↑ 1.0 1 1

Partial Aggregate (cost=450,416.26..450,416.36 rows=1 width=8) (actual time=2.519..2.520 rows=1 loops=1)

  • Buffers: shared hit=1
15. 2.486 2.513 ↓ 0.0 0 1

Parallel Hash Join (cost=1.20..410,093.68 rows=1,612,903 width=4) (actual time=2.513..2.513 rows=0 loops=1)

  • Hash Cond: (f_3.time_key = d_3.time_key)
  • Buffers: shared hit=1
16. 0.000 0.000 ↓ 0.0 0

Parallel Seq Scan on f_3 (cost=0.00..188,318.32 rows=1,612,903 width=4) (never executed)

17. 0.004 0.027 ↓ 0.0 0 1

Parallel Hash (cost=1.07..1.07 rows=1 width=4) (actual time=0.027..0.027 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 0kB
  • Buffers: shared hit=1
18. 0.023 0.023 ↓ 0.0 0 1

Parallel Seq Scan on d_3 (cost=0.00..1.07 rows=1 width=4) (actual time=0.023..0.023 rows=0 loops=1)

  • Filter: (month = 1)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=1
Planning time : 1.815 ms
Execution time : 23,771.313 ms