explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zjWT

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 23.660 ↑ 1.0 1 1

Limit (cost=0.29..7.01 rows=1 width=4,676) (actual time=23.660..23.660 rows=1 loops=1)

2. 0.002 23.659 ↑ 234,450.0 1 1

Nested Loop Left Join (cost=0.29..1,574,139.43 rows=234,450 width=4,676) (actual time=23.659..23.659 rows=1 loops=1)

  • Join Filter: (c.chrgid = js.chrgid)
3. 0.011 23.651 ↑ 692.0 1 1

Nested Loop Left Join (cost=0.29..90,519.63 rows=692 width=4,571) (actual time=23.651..23.651 rows=1 loops=1)

  • Join Filter: (agen.z_agencyname_agencies = pub_arra.agenciesid)
  • Rows Removed by Join Filter: 102
4. 0.003 23.602 ↑ 692.0 1 1

Nested Loop Left Join (cost=0.29..89,450.60 rows=692 width=3,716) (actual time=23.602..23.602 rows=1 loops=1)

  • Join Filter: (b.arragid = agen.agencycode)
  • Rows Removed by Join Filter: 2
5. 0.006 23.590 ↑ 692.0 1 1

Nested Loop Left Join (cost=0.29..88,262.85 rows=692 width=3,452) (actual time=23.590..23.590 rows=1 loops=1)

  • Join Filter: (j.personid = p.id)
  • Rows Removed by Join Filter: 3
6. 0.699 23.579 ↑ 2.0 1 1

Nested Loop Left Join (cost=0.29..83,925.63 rows=2 width=3,207) (actual time=23.579..23.579 rows=1 loops=1)

  • Join Filter: ((b.jailid = r.jailid) AND (b.bookid = r.bookid))
  • Rows Removed by Join Filter: 9,018
7. 0.003 19.731 ↑ 2.0 1 1

Nested Loop Left Join (cost=0.29..79,360.74 rows=2 width=3,038) (actual time=19.731..19.731 rows=1 loops=1)

  • Join Filter: (j.judgeid = c.judgeid)
  • Rows Removed by Join Filter: 2
8. 0.414 19.722 ↑ 2.0 1 1

Nested Loop (cost=0.29..79,359.61 rows=2 width=2,830) (actual time=19.722..19.722 rows=1 loops=1)

  • Join Filter: (c.z_code_offenses = o.offensesid)
  • Rows Removed by Join Filter: 5,366
9. 6.732 18.710 ↑ 2.0 1 1

Nested Loop (cost=0.29..78,407.98 rows=2 width=2,127) (actual time=18.710..18.710 rows=1 loops=1)

  • Join Filter: (b.jamin_book_zid = pt_js.convertedid)
  • Rows Removed by Join Filter: 18,001
10. 0.419 8.760 ↑ 4.0 1 1

Nested Loop (cost=0.29..65,895.26 rows=4 width=1,166) (actual time=8.760..8.760 rows=1 loops=1)

  • Join Filter: (b.jailid = i.jailid)
  • Rows Removed by Join Filter: 6,496
11. 0.003 0.026 ↑ 7.0 1 1

Nested Loop (cost=0.29..55,560.89 rows=7 width=760) (actual time=0.026..0.026 rows=1 loops=1)

12. 0.007 0.007 ↑ 49,977.0 1 1

Seq Scan on jamin_book b (cost=0.00..12,539.77 rows=49,977 width=408) (actual time=0.007..0.007 rows=1 loops=1)

13. 0.016 0.016 ↑ 1.0 1 1

Index Scan using jamin_charge_jailid_bookid_idx on jamin_charge c (cost=0.29..0.85 rows=1 width=352) (actual time=0.016..0.016 rows=1 loops=1)

  • Index Cond: (bookid = b.bookid)
  • Filter: (b.jailid = jailid)
14. 3.122 8.315 ↑ 2.8 6,497 1

Materialize (cost=0.00..2,670.26 rows=18,284 width=406) (actual time=0.013..8.315 rows=6,497 loops=1)

15. 5.193 5.193 ↑ 2.8 6,497 1

Seq Scan on jamin_inmate i (cost=0.00..1,613.84 rows=18,284 width=406) (actual time=0.010..5.193 rows=6,497 loops=1)

16. 3.218 3.218 ↑ 1.2 18,002 1

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

17. 0.598 0.598 ↑ 1.5 5,367 1

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

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

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

20. 3.149 3.149 ↑ 5.5 9,019 1

Seq Scan on jamin_releas r (cost=0.00..1,532.78 rows=49,978 width=169) (actual time=0.003..3.149 rows=9,019 loops=1)

21. 0.005 0.005 ↑ 17,306.8 4 1

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

22. 0.003 0.009 ↑ 38.0 3 1

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

23. 0.006 0.006 ↑ 38.0 3 1

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

24. 0.023 0.038 ↑ 1.0 102 1

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

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

26. 0.002 0.006 ↑ 67,760.0 1 1

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

27. 0.004 0.004 ↑ 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.004..0.004 rows=1 loops=1)

Planning time : 8.438 ms
Execution time : 24.544 ms