explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BQlN

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 635.599 ↑ 1.0 1 1

Limit (cost=0.29..6.69 rows=1 width=6,140) (actual time=635.598..635.599 rows=1 loops=1)

2. 0.004 635.597 ↑ 2,931,636.0 1 1

Nested Loop Left Join (cost=0.29..18,760,920.85 rows=2,931,636 width=6,140) (actual time=635.597..635.597 rows=1 loops=1)

  • Join Filter: (c.chrgid = js.chrgid)
  • Rows Removed by Join Filter: 5
3. 0.017 635.570 ↑ 8,653.0 1 1

Nested Loop Left Join (cost=0.29..229,615.65 rows=8,653 width=6,035) (actual time=635.570..635.570 rows=1 loops=1)

  • Join Filter: (agen.z_agencyname_agencies = pub_arra.agenciesid)
  • Rows Removed by Join Filter: 102
4. 0.008 635.523 ↑ 8,653.0 1 1

Nested Loop Left Join (cost=0.29..216,366.29 rows=8,653 width=5,180) (actual time=635.523..635.523 rows=1 loops=1)

  • Join Filter: (b.arragid = agen.agencycode)
  • Rows Removed by Join Filter: 38
5. 4.138 635.487 ↑ 8,653.0 1 1

Nested Loop Left Join (cost=0.29..201,565.23 rows=8,653 width=4,916) (actual time=635.487..635.487 rows=1 loops=1)

  • Join Filter: (j.personid = p.id)
  • Rows Removed by Join Filter: 69,227
6. 0.924 619.829 ↑ 25.0 1 1

Nested Loop (cost=0.29..147,350.05 rows=25 width=4,671) (actual time=619.829..619.829 rows=1 loops=1)

  • Join Filter: (b.jailid = i.jailid)
  • Rows Removed by Join Filter: 14,039
7. 2.174 601.431 ↑ 3.0 1 1

Nested Loop Left Join (cost=0.29..123,688.46 rows=3 width=3,008) (actual time=601.431..601.431 rows=1 loops=1)

  • Join Filter: ((b.jailid = r.jailid) AND (b.bookid = r.bookid))
  • Rows Removed by Join Filter: 29,056
8. 0.003 589.654 ↑ 3.0 1 1

Nested Loop Left Join (cost=0.29..116,841.11 rows=3 width=2,631) (actual time=589.654..589.654 rows=1 loops=1)

  • Join Filter: (j.judgeid = c.judgeid)
  • Rows Removed by Join Filter: 3
9. 19.163 589.644 ↑ 3.0 1 1

Nested Loop (cost=0.29..116,839.94 rows=3 width=2,423) (actual time=589.644..589.644 rows=1 loops=1)

  • Join Filter: (c.z_code_offenses = o.offensesid)
  • Rows Removed by Join Filter: 268,486
10. 388.379 544.376 ↓ 7.7 23 1

Nested Loop (cost=0.29..115,412.50 rows=3 width=1,720) (actual time=21.203..544.376 rows=23 loops=1)

  • Join Filter: (b.jamin_book_zid = pt_js.convertedid)
  • Rows Removed by Join Filter: 1,124,152
11. 0.085 7.463 ↓ 3.3 23 1

Nested Loop (cost=0.29..93,515.24 rows=7 width=759) (actual time=0.203..7.463 rows=23 loops=1)

12. 6.850 6.850 ↑ 3,043.8 24 1

Seq Scan on jamin_charge c (cost=0.00..18,488.52 rows=73,052 width=353) (actual time=0.177..6.850 rows=24 loops=1)

13. 0.528 0.528 ↑ 1.0 1 24

Index Scan using jamin_book_jailid_idx on jamin_book b (cost=0.29..1.02 rows=1 width=406) (actual time=0.018..0.022 rows=1 loops=24)

  • Index Cond: (jailid = c.jailid)
  • Filter: (c.bookid = bookid)
  • Rows Removed by Filter: 6
14. 148.534 148.534 ↓ 2.3 48,877 23

Seq Scan on stg_combined_jail_stays pt_js (cost=0.00..2,863.08 rows=21,208 width=961) (actual time=0.002..6.458 rows=48,877 loops=23)

15. 26.105 26.105 ↓ 1.4 11,673 23

Seq Scan on offenses o (cost=0.00..374.25 rows=8,125 width=703) (actual time=0.002..1.135 rows=11,673 loops=23)

16. 0.005 0.007 ↑ 1.0 3 1

Materialize (cost=0.00..1.04 rows=3 width=208) (actual time=0.005..0.007 rows=3 loops=1)

17. 0.002 0.002 ↑ 1.0 3 1

Seq Scan on tdt_core_judge j (cost=0.00..1.03 rows=3 width=208) (actual time=0.002..0.002 rows=3 loops=1)

18. 9.603 9.603 ↑ 1.7 29,057 1

Seq Scan on jamin_releas r (cost=0.00..1,532.78 rows=49,978 width=377) (actual time=0.004..9.603 rows=29,057 loops=1)

19. 17.474 17.474 ↑ 11.5 14,040 1

Seq Scan on jamin_inmate i (cost=0.00..5,860.42 rows=162,142 width=1,663) (actual time=0.023..17.474 rows=14,040 loops=1)

20. 11.520 11.520 ↑ 1.0 69,227 1

Seq Scan on tdt_core_person p (cost=0.00..1,303.27 rows=69,227 width=245) (actual time=0.003..11.520 rows=69,227 loops=1)

21. 0.013 0.028 ↑ 3.0 38 1

Materialize (cost=0.00..4.71 rows=114 width=264) (actual time=0.007..0.028 rows=38 loops=1)

22. 0.015 0.015 ↑ 3.0 38 1

Seq Scan on tdt_core_agency agen (cost=0.00..4.14 rows=114 width=264) (actual time=0.004..0.015 rows=38 loops=1)

23. 0.015 0.030 ↑ 1.0 102 1

Materialize (cost=0.00..10.53 rows=102 width=855) (actual time=0.002..0.030 rows=102 loops=1)

24. 0.015 0.015 ↑ 1.0 102 1

Seq Scan on agencies pub_arra (cost=0.00..10.02 rows=102 width=855) (actual time=0.002..0.015 rows=102 loops=1)

25. 0.002 0.023 ↑ 11,293.3 6 1

Materialize (cost=0.00..3,065.40 rows=67,760 width=105) (actual time=0.005..0.023 rows=6 loops=1)

26. 0.021 0.021 ↑ 11,293.3 6 1

Seq Scan on jamin_sentence js (cost=0.00..1,601.60 rows=67,760 width=105) (actual time=0.003..0.021 rows=6 loops=1)

Planning time : 8.901 ms
Execution time : 636.438 ms