explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9mc

Settings
# exclusive inclusive rows x rows loops node
1. 612.972 53,607.453 ↑ 1.0 10,000 1

Hash Left Join (cost=68.25..11,537,387.40 rows=10,000 width=176) (actual time=69.852..53,607.453 rows=10,000 loops=1)

  • Hash Cond: ((main_session.session_type_code)::text = (st.code)::text)
2. 183.489 521.887 ↑ 1.0 10,000 1

Hash Left Join (cost=64.00..398.72 rows=10,000 width=109) (actual time=55.932..521.887 rows=10,000 loops=1)

  • Hash Cond: (main_session.room_id = r.id)
3. 188.009 307.892 ↑ 1.0 10,000 1

Hash Left Join (cost=32.50..340.86 rows=10,000 width=101) (actual time=25.355..307.892 rows=10,000 loops=1)

  • Hash Cond: (main_session.person_id = p.id)
4. 94.800 94.800 ↑ 1.0 10,000 1

Seq Scan on session main_session (cost=0.00..282.00 rows=10,000 width=92) (actual time=0.072..94.800 rows=10,000 loops=1)

5. 12.871 25.083 ↑ 1.0 1,000 1

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

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

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

7. 15.361 30.506 ↑ 1.0 1,000 1

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

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

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

9. 1.239 2.594 ↑ 1.0 100 1

Hash (cost=3.00..3.00 rows=100 width=39) (actual time=2.586..2.594 rows=100 loops=1)

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

Seq Scan on session_type st (cost=0.00..3.00 rows=100 width=39) (actual time=0.188..1.355 rows=100 loops=1)

11.          

SubPlan (forHash Left Join)

12. 480.000 25,580.000 ↑ 1.0 1 10,000

Aggregate (cost=568.00..568.01 rows=1 width=8) (actual time=2.549..2.558 rows=1 loops=10,000)

13. 25,100.000 25,100.000 ↑ 1.0 2 10,000

Seq Scan on hearing_part (cost=0.00..568.00 rows=2 width=16) (actual time=1.302..2.510 rows=2 loops=10,000)

  • Filter: ((NOT is_deleted) AND (session_id = main_session.id))
  • Rows Removed by Filter: 19998
14. 300.000 26,890.000 ↑ 1.0 1 10,000

Aggregate (cost=585.67..585.68 rows=1 width=32) (actual time=2.681..2.689 rows=1 loops=10,000)

15. 254.925 26,590.000 ↓ 0.0 0 10,000

Nested Loop Left Join (cost=0.57..585.66 rows=1 width=17) (actual time=2.294..2.659 rows=0 loops=10,000)

16. 322.855 26,290.000 ↓ 0.0 0 10,000

Nested Loop (cost=0.29..577.36 rows=1 width=24) (actual time=2.270..2.629 rows=0 loops=10,000)

17. 540.000 25,880.000 ↓ 0.0 0 10,000

Nested Loop (cost=0.00..569.04 rows=1 width=32) (actual time=2.240..2.588 rows=0 loops=10,000)

  • Join Filter: ((hearing_part_1.status)::text = (sc.status)::text)
  • Rows Removed by Join Filter: 1
18. 220.000 220.000 ↑ 1.0 1 10,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=10,000)

  • Filter: count_in_utilization
  • Rows Removed by Filter: 4
19. 25,120.000 25,120.000 ↑ 1.0 2 10,000

Seq Scan on hearing_part hearing_part_1 (cost=0.00..568.00 rows=2 width=40) (actual time=1.304..2.512 rows=2 loops=10,000)

  • Filter: ((NOT is_deleted) AND (session_id = main_session.id))
  • Rows Removed by Filter: 19998
20. 87.145 87.145 ↑ 1.0 1 3,005

Index Scan using session_pkey on session s (cost=0.29..8.30 rows=1 width=24) (actual time=0.020..0.029 rows=1 loops=3,005)

  • Index Cond: (id = main_session.id)
21. 45.075 45.075 ↑ 1.0 1 3,005

Index Scan using hearing_pkey on hearing h (cost=0.28..8.30 rows=1 width=25) (actual time=0.015..0.015 rows=1 loops=3,005)

  • Index Cond: (hearing_part_1.hearing_id = id)