explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3ZgD

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 118.716 ↑ 1.0 1 1

Limit (cost=0.41..67.58 rows=1 width=6,141) (actual time=118.716..118.716 rows=1 loops=1)

2. 0.002 118.713 ↑ 1,641,825.0 1 1

Nested Loop Left Join (cost=0.41..110,266,034.99 rows=1,641,825 width=6,141) (actual time=118.713..118.713 rows=1 loops=1)

  • Join Filter: (c.chrgid = js.chrgid)
3. 0.011 118.702 ↑ 4,846.0 1 1

Nested Loop Left Join (cost=0.41..99,887,039.59 rows=4,846 width=6,036) (actual time=118.702..118.702 rows=1 loops=1)

  • Join Filter: (agen.z_agencyname_agencies = pub_arra.agenciesid)
  • Rows Removed by Join Filter: 102
4. 0.007 118.646 ↑ 4,846.0 1 1

Nested Loop Left Join (cost=0.41..99,879,614.93 rows=4,846 width=5,181) (actual time=118.646..118.646 rows=1 loops=1)

  • Join Filter: (b.arragid = agen.agencycode)
  • Rows Removed by Join Filter: 23
5. 4.372 118.609 ↑ 4,846.0 1 1

Nested Loop Left Join (cost=0.41..99,871,323.85 rows=4,846 width=4,917) (actual time=118.609..118.609 rows=1 loops=1)

  • Join Filter: (j.personid = p.id)
  • Rows Removed by Join Filter: 69,227
6. 1.323 102.194 ↑ 14.0 1 1

Nested Loop (cost=0.41..99,840,963.34 rows=14 width=4,672) (actual time=102.194..102.194 rows=1 loops=1)

  • Join Filter: (b.jailid = i.jailid)
  • Rows Removed by Join Filter: 17,527
7. 3.859 84.397 ↑ 3.0 1 1

Nested Loop Left Join (cost=0.41..99,827,818.01 rows=3 width=3,009) (actual time=84.397..84.397 rows=1 loops=1)

  • Join Filter: ((b.jailid = r.jailid) AND (b.bookid = r.bookid))
  • Rows Removed by Join Filter: 49,222
8. 0.004 64.073 ↑ 3.0 1 1

Nested Loop Left Join (cost=0.41..99,820,970.66 rows=3 width=2,632) (actual time=64.073..64.073 rows=1 loops=1)

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

Nested Loop (cost=0.41..99,820,969.49 rows=3 width=2,424) (actual time=64.063..64.063 rows=1 loops=1)

  • Join Filter: (c.z_code_offenses = o.offensesid)
  • Rows Removed by Join Filter: 5,366
10. 3.285 62.487 ↑ 3.0 1 1

Nested Loop (cost=0.41..99,819,542.05 rows=3 width=1,721) (actual time=62.487..62.487 rows=1 loops=1)

  • Join Filter: ((b.jailid = c.jailid) AND (b.bookid = c.bookid))
  • Rows Removed by Join Filter: 44,490
11. 0.004 0.051 ↑ 21,208.0 1 1

Nested Loop (cost=0.41..62,435.62 rows=21,208 width=1,368) (actual time=0.051..0.051 rows=1 loops=1)

12. 0.015 0.015 ↑ 21,208.0 1 1

Seq Scan on stg_combined_jail_stays pt_js (cost=0.00..2,863.08 rows=21,208 width=961) (actual time=0.015..0.015 rows=1 loops=1)

13. 0.032 0.032 ↑ 1.0 1 1

Index Scan using jamin_book_pkey on jamin_book b (cost=0.41..2.80 rows=1 width=407) (actual time=0.032..0.032 rows=1 loops=1)

  • Index Cond: (jamin_book_zid = pt_js.convertedid)
14. 31.002 59.151 ↑ 1.6 44,491 1

Materialize (cost=0.00..10,794.78 rows=73,052 width=353) (actual time=0.011..59.151 rows=44,491 loops=1)

15. 28.149 28.149 ↑ 1.6 44,491 1

Seq Scan on jamin_charge c (cost=0.00..7,004.52 rows=73,052 width=353) (actual time=0.008..28.149 rows=44,491 loops=1)

16. 1.023 1.023 ↑ 1.5 5,367 1

Seq Scan on offenses o (cost=0.00..374.25 rows=8,125 width=703) (actual time=0.022..1.023 rows=5,367 loops=1)

17. 0.004 0.006 ↑ 1.0 3 1

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

18. 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)

19. 16.465 16.465 ↑ 1.0 49,223 1

Seq Scan on jamin_releas r (cost=0.00..1,532.78 rows=49,978 width=377) (actual time=0.005..16.465 rows=49,223 loops=1)

20. 16.474 16.474 ↑ 5.1 17,528 1

Seq Scan on jamin_inmate i (cost=0.00..3,255.79 rows=90,079 width=1,663) (actual time=0.009..16.474 rows=17,528 loops=1)

21. 12.043 12.043 ↑ 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.004..12.043 rows=69,227 loops=1)

22. 0.008 0.030 ↑ 4.8 24 1

Materialize (cost=0.00..4.71 rows=114 width=264) (actual time=0.006..0.030 rows=24 loops=1)

23. 0.022 0.022 ↑ 4.8 24 1

Seq Scan on tdt_core_agency agen (cost=0.00..4.14 rows=114 width=264) (actual time=0.005..0.022 rows=24 loops=1)

24. 0.023 0.045 ↑ 1.0 102 1

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

25. 0.022 0.022 ↑ 1.0 102 1

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

26. 0.002 0.009 ↑ 67,760.0 1 1

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

27. 0.007 0.007 ↑ 67,760.0 1 1

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

Planning time : 8.813 ms
Execution time : 121.296 ms