explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BnKLw

Settings
# exclusive inclusive rows x rows loops node
1. 0.354 422,383.991 ↑ 10.8 557 1

Unique (cost=945,249.3..945,324.68 rows=6,030 width=24) (actual time=422,383.576..422,383.991 rows=557 loops=1)

  • Buffers: shared hit=51,216 read=49,345 dirtied=1 written=10
2. 0.481 422,383.637 ↑ 10.8 557 1

Sort (cost=945,249.3..945,264.38 rows=6,030 width=24) (actual time=422,383.567..422,383.637 rows=557 loops=1)

  • Sort Key: p_2.id, p_2.tipo, (min(g.id)), (min(s.last_synch))
  • Sort Method: quicksort Memory: 68kB
  • Buffers: shared hit=51,216 read=49,345 dirtied=1 written=10
3. 0.000 422,383.156 ↑ 10.8 557 1

GroupAggregate (cost=939,308.01..944,870.68 rows=6,030 width=24) (actual time=422,381.302..422,383.156 rows=557 loops=1)

  • Group Key: p_2.id
  • Buffers: shared hit=51,210 read=49,345 dirtied=1 written=10
4. 161.129 422,470.231 ↑ 22.3 1,895 1

Gather Merge (cost=939,308.01..944,493.81 rows=42,210 width=24) (actual time=422,381.15..422,470.231 rows=1,895 loops=1)

  • Workers Planned: 7
  • Workers Launched: 7
  • Buffers: shared hit=409,958 read=414,124 dirtied=7 written=98
5. 0.376 422,309.102 ↑ 25.4 237 8 / 8

Sort (cost=938,307.89..938,322.96 rows=6,030 width=24) (actual time=422,309.06..422,309.102 rows=237 loops=8)

  • Sort Key: p_2.id
  • Sort Method: quicksort Memory: 43kB
  • Buffers: shared hit=409,958 read=414,124 dirtied=7 written=98
6. 9.354 422,308.726 ↑ 25.4 237 8 / 8

HashAggregate (cost=937,868.97..937,929.27 rows=6,030 width=24) (actual time=422,308.152..422,308.726 rows=237 loops=8)

  • Group Key: p_2.id
  • Buffers: shared hit=409,902 read=414,124 dirtied=7 written=98
7. 17.344 422,299.372 ↑ 18.7 20,009 8 / 8

Hash Join (cost=5,333.08..935,068.79 rows=373,357 width=24) (actual time=20,403.188..422,299.372 rows=20,009 loops=8)

  • Buffers: shared hit=409,902 read=414,124 dirtied=7 written=98
8. 417,749.294 417,749.294 ↑ 26.9 20,009 8 / 8

Seq Scan on new_logs_running g (cost=0..925,517.6 rows=539,168 width=12) (actual time=15,869.543..417,749.294 rows=20,009 loops=8)

  • Filter: ((NOT g.frozen) AND (g.day >= ('now'::cstring)::date) AND (g.scheduled_date <= ('now'::cstring)::date))
  • Buffers: shared hit=407,115 read=414,077 dirtied=6 written=98
9. 325.617 4,532.734 ↑ 4.6 13,518 8 / 8

Hash (cost=4,555.03..4,555.03 rows=62,244 width=20) (actual time=4,532.734..4,532.734 rows=13,518 loops=8)

  • Buffers: shared hit=2,787 read=47 dirtied=1
10. 6.810 4,207.117 ↑ 4.6 13,518 8 / 8

Hash Join (cost=566.66..4,555.03 rows=62,244 width=20) (actual time=4,138.418..4,207.117 rows=13,518 loops=8)

  • Buffers: shared hit=2,787 read=47 dirtied=1
11. 6.541 4,191.364 ↑ 4.6 13,518 8 / 8

Hash Join (cost=341.05..4,165.94 rows=62,244 width=12) (actual time=4,129.461..4,191.364 rows=13,518 loops=8)

  • Buffers: shared hit=2,745 read=19
12. 9.604 55.816 ↑ 4.6 13,518 8 / 8

Hash Join (cost=330.28..3,989.53 rows=62,244 width=12) (actual time=0.414..55.816 rows=13,518 loops=8)

  • Buffers: shared hit=2,722 read=19
13. 45.825 45.825 ↑ 4.7 16,184 8 / 8

Seq Scan on rooms r (cost=0..3,458.86 rows=76,292 width=8) (actual time=0.011..45.825 rows=16,184 loops=8)

  • Filter: r.attiva
  • Buffers: shared hit=2,541 read=19
14. 0.123 0.387 ↑ 1.0 5,980 1 / 8

Hash (cost=254.91..254.91 rows=6,030 width=8) (actual time=3.095..3.096 rows=5,980 loops=1)

  • Buffers: shared hit=181
15. 0.264 0.264 ↑ 1.0 5,980 1 / 8

Seq Scan on portals p_2 (cost=0..254.91 rows=6,030 width=8) (actual time=0.028..2.112 rows=5,980 loops=1)

  • Filter: p_2.enabled
  • Buffers: shared hit=181
16. 4,128.799 4,129.007 ↑ 1.0 305 8 / 8

Hash (cost=6.94..6.94 rows=306 width=4) (actual time=4,129.007..4,129.007 rows=305 loops=8)

  • Buffers: shared hit=23
17. 0.208 0.208 ↑ 1.0 305 8 / 8

Index Only Scan using portal_types_pkey on portal_types t_1 (cost=0.15..6.94 rows=306 width=4) (actual time=0.134..0.208 rows=305 loops=8)

  • Buffers: shared hit=23
18. 0.181 8.943 ↑ 1.0 6,916 1 / 8

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

  • Buffers: shared hit=42 read=28 dirtied=1
19. 8.761 8.761 ↑ 1.0 6,916 1 / 8

Seq Scan on writer_consumer_stats s (cost=0..139.16 rows=6,916 width=12) (actual time=0.054..70.091 rows=6,916 loops=1)

  • Buffers: shared hit=42 read=28 dirtied=1
Planning time : 3.811 ms
Execution time : 422,485.667 ms