explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2OtE

Settings
# exclusive inclusive rows x rows loops node
1. 6,373.871 4,776,175.971 ↓ 1.1 100,000 1

Hash Left Join (cost=67.25..1,050,308,080.06 rows=92,351 width=176) (actual time=117.347..4,776,175.971 rows=100,000 loops=1)

  • Hash Cond: ((main_session.session_type_code)::text = (st.code)::text)
2. 1,792.249 4,600.480 ↓ 1.1 100,000 1

Hash Left Join (cost=64.00..3,796.40 rows=92,351 width=109) (actual time=57.704..4,600.480 rows=100,000 loops=1)

  • Hash Cond: (main_session.room_id = r.id)
3. 1,832.710 2,788.585 ↓ 1.1 100,000 1

Hash Left Join (cost=32.50..3,521.45 rows=92,351 width=101) (actual time=37.892..2,788.585 rows=100,000 loops=1)

  • Hash Cond: (main_session.person_id = p.id)
4. 918.084 918.084 ↓ 1.1 100,000 1

Seq Scan on session main_session (cost=0.00..3,245.51 rows=92,351 width=92) (actual time=0.028..918.084 rows=100,000 loops=1)

5. 13.971 37.791 ↑ 1.0 1,000 1

Hash (cost=20.00..20.00 rows=1,000 width=25) (actual time=37.783..37.791 rows=1,000 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 65kB
6. 23.820 23.820 ↑ 1.0 1,000 1

Seq Scan on person p (cost=0.00..20.00 rows=1,000 width=25) (actual time=0.140..23.820 rows=1,000 loops=1)

7. 9.711 19.646 ↑ 1.0 1,000 1

Hash (cost=19.00..19.00 rows=1,000 width=24) (actual time=19.638..19.646 rows=1,000 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 64kB
8. 9.935 9.935 ↑ 1.0 1,000 1

Seq Scan on room r (cost=0.00..19.00 rows=1,000 width=24) (actual time=0.073..9.935 rows=1,000 loops=1)

9. 0.823 1.620 ↑ 1.0 100 1

Hash (cost=2.00..2.00 rows=100 width=39) (actual time=1.613..1.620 rows=100 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
10. 0.797 0.797 ↑ 1.0 100 1

Seq Scan on session_type st (cost=0.00..2.00 rows=100 width=39) (actual time=0.022..0.797 rows=100 loops=1)

11.          

SubPlan (forHash Left Join)

12. 5,500.000 2,376,000.000 ↑ 1.0 1 100,000

Aggregate (cost=5,677.57..5,677.58 rows=1 width=8) (actual time=23.752..23.760 rows=1 loops=100,000)

13. 2,370,500.000 2,370,500.000 ↑ 1.0 2 100,000

Seq Scan on hearing_part (cost=0.00..5,677.56 rows=2 width=16) (actual time=12.261..23.705 rows=2 loops=100,000)

  • Filter: ((NOT is_deleted) AND (session_id = main_session.id))
  • Rows Removed by Filter: 199998
14. 3,100.000 2,389,200.000 ↑ 1.0 1 100,000

Aggregate (cost=5,695.37..5,695.38 rows=1 width=32) (actual time=23.884..23.892 rows=1 loops=100,000)

15. 2,524.080 2,386,100.000 ↓ 0.0 0 100,000

Nested Loop Left Join (cost=0.71..5,695.36 rows=1 width=17) (actual time=20.581..23.861 rows=0 loops=100,000)

16. 3,307.650 2,383,100.000 ↓ 0.0 0 100,000

Nested Loop (cost=0.42..5,687.05 rows=1 width=24) (actual time=20.557..23.831 rows=0 loops=100,000)

17. 5,800.000 2,378,900.000 ↓ 0.0 0 100,000

Nested Loop (cost=0.00..5,678.61 rows=1 width=32) (actual time=20.525..23.789 rows=0 loops=100,000)

  • Join Filter: ((hearing_part_1.status)::text = (sc.status)::text)
  • Rows Removed by Join Filter: 1
18. 2,200.000 2,200.000 ↑ 1.0 1 100,000

Seq Scan on status_config sc (cost=0.00..1.02 rows=1 width=78) (actual time=0.012..0.022 rows=1 loops=100,000)

  • Filter: count_in_utilization
  • Rows Removed by Filter: 4
19. 2,370,900.000 2,370,900.000 ↑ 1.0 2 100,000

Seq Scan on hearing_part hearing_part_1 (cost=0.00..5,677.56 rows=2 width=40) (actual time=12.254..23.709 rows=2 loops=100,000)

  • Filter: ((NOT is_deleted) AND (session_id = main_session.id))
  • Rows Removed by Filter: 199998
20. 892.350 892.350 ↑ 1.0 1 29,745

Index Scan using session_pkey on session s (cost=0.42..8.44 rows=1 width=24) (actual time=0.021..0.030 rows=1 loops=29,745)

  • Index Cond: (id = main_session.id)
21. 475.920 475.920 ↑ 1.0 1 29,745

Index Scan using hearing_pkey on hearing h (cost=0.29..8.31 rows=1 width=25) (actual time=0.016..0.016 rows=1 loops=29,745)

  • Index Cond: (hearing_part_1.hearing_id = id)