explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FDpW

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

Limit (cost=3,776.91..25,207.97 rows=1 width=2,465) (actual time=407.676..407.677 rows=1 loops=1)

2. 0.005 407.674 ↑ 1.0 1 1

Nested Loop Left Join (cost=3,776.91..25,207.97 rows=1 width=2,465) (actual time=407.674..407.674 rows=1 loops=1)

3. 0.006 397.502 ↑ 1.0 1 1

Nested Loop (cost=3,776.62..25,207.64 rows=1 width=2,292) (actual time=397.502..397.502 rows=1 loops=1)

4. 1.648 397.297 ↑ 1.0 1 1

Nested Loop (cost=3,776.19..25,204.66 rows=1 width=1,982) (actual time=397.297..397.297 rows=1 loops=1)

  • Join Filter: ((prop.jailid = pr.jailid) AND (prop.bookid = pr.bookid) AND (prop.ord = pr.ord))
  • Rows Removed by Join Filter: 22,326
5. 12.104 382.041 ↑ 1.0 1 1

Hash Join (cost=3,776.19..22,819.22 rows=1 width=1,618) (actual time=382.041..382.041 rows=1 loops=1)

  • Hash Cond: ((prop.jailid = b.jailid) AND (prop.bookid = b.bookid))
6. 0.019 0.019 ↑ 32,781.0 18 1

Seq Scan on jamin_propitem prop (cost=0.00..14,617.58 rows=590,058 width=244) (actual time=0.013..0.019 rows=18 loops=1)

7. 83.858 369.918 ↓ 471.2 49,952 1

Hash (cost=3,774.60..3,774.60 rows=106 width=1,374) (actual time=369.918..369.918 rows=49,952 loops=1)

  • Buckets: 16,384 (originally 1024) Batches: 8 (originally 1) Memory Usage: 4,993kB
8. 49.226 286.060 ↓ 471.2 49,952 1

Nested Loop (cost=0.41..3,774.60 rows=106 width=1,374) (actual time=0.199..286.060 rows=49,952 loops=1)

9. 86.978 86.978 ↓ 471.2 49,952 1

Seq Scan on stg_combined_jail_stays pt_js (cost=0.00..2,911.70 rows=106 width=961) (actual time=0.183..86.978 rows=49,952 loops=1)

  • Filter: (wtrun = 201)
10. 149.856 149.856 ↑ 1.0 1 49,952

Index Scan using jamin_book_pkey on jamin_book b (cost=0.41..8.13 rows=1 width=413) (actual time=0.003..0.003 rows=1 loops=49,952)

  • Index Cond: (jamin_book_zid = pt_js.convertedid)
11. 13.608 13.608 ↓ 50.7 22,327 1

Seq Scan on jamin_proprec pr (cost=0.00..2,377.74 rows=440 width=364) (actual time=0.010..13.608 rows=22,327 loops=1)

  • Filter: (type = 'RB'::text)
  • Rows Removed by Filter: 39,987
12. 0.199 0.199 ↑ 1.0 1 1

Index Scan using idx_pt_people_names_convertedid_wtrun on pt_people_names pt_pn (cost=0.43..2.97 rows=1 width=310) (actual time=0.199..0.199 rows=1 loops=1)

  • Index Cond: ((convertedid = b.jamin_book_zid) AND (wtrun = 205))
13. 10.167 10.167 ↑ 1.0 1 1

Index Scan using jamin_releas_jailid_bookid_idx on jamin_releas prop_rel (cost=0.29..0.32 rows=1 width=173) (actual time=10.167..10.167 rows=1 loops=1)

  • Index Cond: ((prop.jailid = jailid) AND (prop.bookid = bookid))
Planning time : 4.876 ms
Execution time : 413.290 ms