explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HdbY

Settings
# exclusive inclusive rows x rows loops node
1. 637.796 56,602.450 ↑ 1.0 10,000 1

Hash Left Join (cost=68.25..11,537,387.40 rows=10,000 width=176) (actual time=52.445..56,602.450 rows=10,000 loops=1)

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

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

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

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

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

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

5. 10.544 20.721 ↑ 1.0 1,000 1

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

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

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

7. 11.711 23.248 ↑ 1.0 1,000 1

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

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

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

9. 0.925 1.909 ↑ 1.0 100 1

Hash (cost=3.00..3.00 rows=100 width=39) (actual time=1.902..1.909 rows=100 loops=1)

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

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

11.          

SubPlan (forHash Left Join)

12. 510.000 27,000.000 ↑ 1.0 1 10,000

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

13. 26,490.000 26,490.000 ↑ 1.0 2 10,000

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

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

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

15. 258.915 28,120.000 ↓ 0.0 0 10,000

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

16. 339.850 27,810.000 ↓ 0.0 0 10,000

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

17. 560.000 27,380.000 ↓ 0.0 0 10,000

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

  • Join Filter: ((hearing_part_1.status)::text = (sc.status)::text)
  • Rows Removed by Join Filter: 1
18. 230.000 230.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.023 rows=1 loops=10,000)

  • Filter: count_in_utilization
  • Rows Removed by Filter: 4
19. 26,590.000 26,590.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.385..2.659 rows=2 loops=10,000)

  • Filter: ((NOT is_deleted) AND (session_id = main_session.id))
  • Rows Removed by Filter: 19998
20. 90.150 90.150 ↑ 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.021..0.030 rows=1 loops=3,005)

  • Index Cond: (id = main_session.id)
21. 51.085 51.085 ↑ 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.017..0.017 rows=1 loops=3,005)

  • Index Cond: (hearing_part_1.hearing_id = id)