explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qPMZ

Settings
# exclusive inclusive rows x rows loops node
1. 0.254 13,793.218 ↑ 14.1 427 1

Unique (cost=545,181.59..545,256.97 rows=6,030 width=24) (actual time=13,792.932..13,793.218 rows=427 loops=1)

  • Buffers: shared hit=28624 read=30817 dirtied=529 written=633
2. 11.052 13,792.964 ↑ 14.1 427 1

Sort (cost=545,181.59..545,196.67 rows=6,030 width=24) (actual time=13,792.912..13,792.964 rows=427 loops=1)

  • Sort Key: p_2.id, p_2.tipo, (min(g.id)), (min(s.last_synch))
  • Sort Method: quicksort Memory: 58kB
  • Buffers: shared hit=28624 read=30817 dirtied=529 written=633
3. 0.000 13,781.912 ↑ 14.1 427 1

Aggregate (cost=540,059.05..544,802.97 rows=6,030 width=24) (actual time=13,780.361..13,781.912 rows=427 loops=1)

  • Buffers: shared hit=28624 read=30817 dirtied=529 written=633
4. 766.241 14,029.172 ↑ 20.2 1,794 1

Gather Merge (cost=540,059.05..544,471.32 rows=36,180 width=24) (actual time=13,780.215..14,029.172 rows=1,794 loops=1)

  • Workers Planned: 6
  • Workers Launched: 6
  • Buffers: shared hit=179083 read=181448 dirtied=3325 written=3802
5. 7.179 13,262.931 ↑ 23.6 256 7 / 7

Sort (cost=539,058.95..539,074.02 rows=6,030 width=24) (actual time=13,262.893..13,262.931 rows=256 loops=7)

  • Sort Key: p_2.id
  • Sort Method: quicksort Memory: 44kB
  • Buffers: shared hit=179083 read=181448 dirtied=3325 written=3802
6. 131.835 13,255.752 ↑ 23.6 256 7 / 7

Aggregate (cost=538,620.03..538,680.33 rows=6,030 width=24) (actual time=13,255.424..13,255.752 rows=256 loops=7)

  • Buffers: shared hit=179035 read=181448 dirtied=3325 written=3802
7. 176.124 13,123.917 ↑ 3.4 148,459 7 / 7

Hash Join (cost=5,333.51..534,788.18 rows=510,913 width=24) (actual time=1,444.29..13,123.917 rows=148,459 loops=7)

  • Buffers: shared hit=179035 read=181448 dirtied=3325 written=3802
8. 12,026.302 12,026.302 ↑ 5.0 148,459 7 / 7

Index Scan using new_logs_running_frozen_including on new_logs_running g (cost=0.43..523,682.91 rows=737,814 width=12) (actual time=521.505..12,026.302 rows=148,459 loops=7)

  • Filter: ((g.day >= CURRENT_DATE) AND (g.scheduled_date <= CURRENT_DATE))
  • Buffers: shared hit=175200 read=181448 dirtied=3325 written=3802
9. 38.546 921.491 ↑ 4.0 15,421 7 / 7

Hash (cost=4,555.03..4,555.03 rows=62,244 width=20) (actual time=921.491..921.491 rows=15,421 loops=7)

  • Buffers: shared hit=3835
10. 3.747 882.945 ↑ 4.0 15,421 7 / 7

Hash Join (cost=566.66..4,555.03 rows=62,244 width=20) (actual time=863.769..882.945 rows=15,421 loops=7)

  • Buffers: shared hit=3835
11. 3.361 876.802 ↑ 4.0 15,421 7 / 7

Hash Join (cost=341.05..4,165.94 rows=62,244 width=12) (actual time=861.345..876.802 rows=15,421 loops=7)

  • Buffers: shared hit=3485
12. 5.072 14.363 ↑ 4.0 15,421 7 / 7

Hash Join (cost=330.28..3,989.53 rows=62,244 width=12) (actual time=2.238..14.363 rows=15,421 loops=7)

  • Buffers: shared hit=3465
13. 7.092 7.092 ↑ 4.1 18,497 7 / 7

Seq Scan on rooms r (cost=0..3,458.86 rows=76,292 width=8) (actual time=0.022..7.092 rows=18,497 loops=7)

  • Filter: r.attiva
  • Buffers: shared hit=2560
14. 0.730 2.199 ↑ 1.0 5,963 5 / 7

Hash (cost=254.91..254.91 rows=6,030 width=8) (actual time=3.078..3.078 rows=5,963 loops=5)

  • Buffers: shared hit=905
15. 1.469 1.469 ↑ 1.0 5,963 5 / 7

Seq Scan on portals p_2 (cost=0..254.91 rows=6,030 width=8) (actual time=0.045..2.056 rows=5,963 loops=5)

  • Filter: p_2.enabled
  • Buffers: shared hit=905
16. 858.882 859.078 ↑ 1.0 305 7 / 7

Hash (cost=6.94..6.94 rows=306 width=4) (actual time=859.078..859.078 rows=305 loops=7)

  • Buffers: shared hit=20
17. 0.196 0.196 ↑ 1.0 305 7 / 7

Index Only Scan using portal_types_pkey on portal_types t_1 (cost=0.15..6.94 rows=306 width=4) (actual time=0.147..0.196 rows=305 loops=7)

  • Buffers: shared hit=20
18. 0.980 2.396 ↑ 1.0 6,916 5 / 7

Hash (cost=139.16..139.16 rows=6,916 width=12) (actual time=3.354..3.354 rows=6,916 loops=5)

  • Buffers: shared hit=350
19. 1.416 1.416 ↑ 1.0 6,916 5 / 7

Seq Scan on writer_consumer_stats s (cost=0..139.16 rows=6,916 width=12) (actual time=0.041..1.982 rows=6,916 loops=5)

  • Buffers: shared hit=350
Planning time : 2.563 ms
Execution time : 14,059.077 ms