explain.depesz.com

PostgreSQL's explain analyze made readable

Result: T7kd

Settings
# exclusive inclusive rows x rows loops node
1. 0.275 26,193.724 ↑ 12.7 475 1

Unique (cost=198,239.82..198,315.19 rows=6,030 width=24) (actual time=26,193.358..26,193.724 rows=475 loops=1)

  • Buffers: shared hit=40,337 read=268,916 dirtied=591 written=11,523
2. 63.618 26,193.449 ↑ 12.7 475 1

Sort (cost=198,239.82..198,254.89 rows=6,030 width=24) (actual time=26,193.345..26,193.449 rows=475 loops=1)

  • Sort Key: p_2.id, p_2.tipo, (min(g.id)), (min(s.last_synch))
  • Sort Method: quicksort Memory: 62kB
  • Buffers: shared hit=40,337 read=268,916 dirtied=591 written=11,523
3. 363.870 26,129.831 ↑ 12.7 475 1

HashAggregate (cost=197,800.9..197,861.2 rows=6,030 width=24) (actual time=26,129.51..26,129.831 rows=475 loops=1)

  • Group Key: p_2.id
  • Buffers: shared hit=40,337 read=268,916 dirtied=591 written=11,523
4. 353.904 25,765.961 ↓ 9.7 817,499 1

Hash Join (cost=9,126.81..197,170.18 rows=84,095 width=24) (actual time=3,601.507..25,765.961 rows=817,499 loops=1)

  • Buffers: shared hit=40,337 read=268,916 dirtied=591 written=11,523
5. 354.540 25,404.828 ↓ 9.7 817,499 1

Hash Join (cost=8,901.2..196,723.7 rows=84,095 width=16) (actual time=3,594.161..25,404.828 rows=817,499 loops=1)

  • Buffers: shared hit=40,270 read=268,913 dirtied=591 written=11,523
6. 350.433 24,946.707 ↓ 9.7 817,499 1

Hash Join (cost=8,890.44..196,489.13 rows=84,095 width=16) (actual time=3,490.551..24,946.707 rows=817,499 loops=1)

  • Buffers: shared hit=40,268 read=268,913 dirtied=591 written=11,523
7. 409.560 24,592.876 ↓ 7.9 817,499 1

Hash Join (cost=8,560.15..195,888.12 rows=103,076 width=12) (actual time=3,487.077..24,592.876 rows=817,499 loops=1)

  • Buffers: shared hit=40,087 read=268,913 dirtied=591 written=11,523
8. 21,438.402 23,823.362 ↓ 6.7 817,499 1

Bitmap Heap Scan on new_logs_running g (cost=2,850.87..189,860.04 rows=121,442 width=12) (actual time=3,126.574..23,823.362 rows=817,499 loops=1)

  • Filter: ((g.day >= CURRENT_DATE) AND (g.scheduled_date <= CURRENT_DATE))
  • Heap Blocks: exact=305,165
  • Buffers: shared hit=37,544 read=268,896 dirtied=591 written=11,521
9. 2,384.960 2,384.960 ↓ 36.1 5,431,580 1

Bitmap Index Scan on new_logs_running_frozen_gin (cost=0..2,820.51 rows=150,494 width=0) (actual time=2,384.96..2,384.96 rows=5,431,580 loops=1)

  • Index Cond: (boolean2int(g.frozen) = 0)
  • Buffers: shared hit=170 read=765 written=31
10. 108.357 359.954 ↑ 1.0 129,476 1

Hash (cost=4,088.07..4,088.07 rows=129,697 width=8) (actual time=359.954..359.954 rows=129,476 loops=1)

  • Buffers: shared hit=2,543 read=17 written=2
11. 251.597 251.597 ↑ 1.0 129,476 1

Seq Scan on rooms r (cost=0..4,088.07 rows=129,697 width=8) (actual time=0.045..251.597 rows=129,476 loops=1)

  • Filter: r.attiva
  • Buffers: shared hit=2,543 read=17 written=2
12. 1.070 3.398 ↑ 1.0 5,963 1

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

  • Buffers: shared hit=181
13. 2.328 2.328 ↑ 1.0 5,963 1

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

  • Filter: p_2.enabled
  • Buffers: shared hit=181
14. 102.799 103.581 ↑ 1.0 305 1

Hash (cost=6.94..6.94 rows=306 width=4) (actual time=103.581..103.581 rows=305 loops=1)

  • Buffers: shared hit=2
15. 0.782 0.782 ↑ 1.0 305 1

Index Only Scan using portal_types_pkey on portal_types t_1 (cost=0.15..6.94 rows=306 width=4) (actual time=0.74..0.782 rows=305 loops=1)

  • Buffers: shared hit=2
16. 2.794 7.229 ↑ 1.0 6,916 1

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

  • Buffers: shared hit=67 read=3
17. 4.435 4.435 ↑ 1.0 6,916 1

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

  • Buffers: shared hit=67 read=3
Planning time : 2.361 ms
Execution time : 26,234.713 ms