explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qpN3O

Settings
# exclusive inclusive rows x rows loops node
1. 0.203 2,612.012 ↑ 15.0 403 1

Unique (cost=523,619.99..523,695.36 rows=6,030 width=24) (actual time=2,611.762..2,612.012 rows=403 loops=1)

  • Buffers: shared hit=61,341 read=8
2. 0.218 2,611.809 ↑ 15.0 403 1

Sort (cost=523,619.99..523,635.06 rows=6,030 width=24) (actual time=2,611.76..2,611.809 rows=403 loops=1)

  • Sort Key: p_2.id, p_2.tipo, (min(g.id)), (min(s.last_synch))
  • Sort Method: quicksort Memory: 56kB
  • Buffers: shared hit=61,341 read=8
3. 0.000 2,611.591 ↑ 15.0 403 1

GroupAggregate (cost=519,309.06..523,241.36 rows=6,030 width=24) (actual time=2,610.219..2,611.591 rows=403 loops=1)

  • Group Key: p_2.id
  • Buffers: shared hit=61,341 read=8
4. 168.058 2,714.981 ↑ 20.6 1,464 1

Gather Merge (cost=519,309.06..522,954.94 rows=30,150 width=24) (actual time=2,610.134..2,714.981 rows=1,464 loops=1)

  • Workers Planned: 5
  • Workers Launched: 5
  • Buffers: shared hit=338,189 read=81 written=5
5. 0.169 2,546.923 ↑ 24.7 244 6 / 6

Sort (cost=518,308.98..518,324.05 rows=6,030 width=24) (actual time=2,546.902..2,546.923 rows=244 loops=6)

  • Sort Key: p_2.id
  • Sort Method: quicksort Memory: 43kB
  • Buffers: shared hit=338,189 read=81 written=5
6. 31.879 2,546.754 ↑ 24.7 244 6 / 6

HashAggregate (cost=517,870.06..517,930.36 rows=6,030 width=24) (actual time=2,546.645..2,546.754 rows=244 loops=6)

  • Group Key: p_2.id
  • Buffers: shared hit=338,149 read=81 written=5
7. 50.891 2,514.875 ↑ 4.2 141,100 6 / 6

Hash Join (cost=5,333.51..513,403.57 rows=595,531 width=24) (actual time=1,432.233..2,514.875 rows=141,100 loops=6)

  • Buffers: shared hit=338,149 read=81 written=5
8. 1,049.092 1,049.092 ↑ 6.1 141,100 6 / 6

Index Scan using new_logs_running_frozen_btree on new_logs_running g (cost=0.43..501,342.3 rows=860,013 width=12) (actual time=16.836..1,049.092 rows=141,100 loops=6)

  • Filter: ((g.day >= CURRENT_DATE) AND (g.scheduled_date <= CURRENT_DATE))
  • Buffers: shared hit=335,070 read=81 written=5
9. 77.726 1,414.892 ↑ 3.5 17,991 6 / 6

Hash (cost=4,555.03..4,555.03 rows=62,244 width=20) (actual time=1,414.892..1,414.892 rows=17,991 loops=6)

  • Buffers: shared hit=3,079
10. 5.410 1,337.166 ↑ 3.5 17,991 6 / 6

Hash Join (cost=566.66..4,555.03 rows=62,244 width=20) (actual time=1,313.293..1,337.166 rows=17,991 loops=6)

  • Buffers: shared hit=3,079
11. 4.558 1,330.621 ↑ 3.5 17,991 6 / 6

Hash Join (cost=341.05..4,165.94 rows=62,244 width=12) (actual time=1,312.137..1,330.621 rows=17,991 loops=6)

  • Buffers: shared hit=2,939
12. 6.082 15.306 ↑ 3.5 17,991 6 / 6

Hash Join (cost=330.28..3,989.53 rows=62,244 width=12) (actual time=1.137..15.306 rows=17,991 loops=6)

  • Buffers: shared hit=2,922
13. 8.137 8.137 ↑ 3.5 21,579 6 / 6

Seq Scan on rooms r (cost=0..3,458.86 rows=76,292 width=8) (actual time=0.036..8.137 rows=21,579 loops=6)

  • Filter: r.attiva
  • Buffers: shared hit=2,560
14. 0.365 1.087 ↑ 1.0 5,963 2 / 6

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

  • Buffers: shared hit=362
15. 0.722 0.722 ↑ 1.0 5,963 2 / 6

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

  • Filter: p_2.enabled
  • Buffers: shared hit=362
16. 1,310.270 1,310.757 ↑ 1.0 305 6 / 6

Hash (cost=6.94..6.94 rows=306 width=4) (actual time=1,310.756..1,310.757 rows=305 loops=6)

  • Buffers: shared hit=17
17. 0.487 0.487 ↑ 1.0 305 6 / 6

Index Only Scan using portal_types_pkey on portal_types t_1 (cost=0.15..6.94 rows=306 width=4) (actual time=0.445..0.487 rows=305 loops=6)

  • Buffers: shared hit=17
18. 0.493 1.135 ↑ 1.0 6,916 2 / 6

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

  • Buffers: shared hit=140
19. 0.642 0.642 ↑ 1.0 6,916 2 / 6

Seq Scan on writer_consumer_stats s (cost=0..139.16 rows=6,916 width=12) (actual time=0.072..1.925 rows=6,916 loops=2)

  • Buffers: shared hit=140
Planning time : 2.719 ms
Execution time : 2,728.055 ms