explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lKfp

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

Limit (cost=3,777.18..25,207.20 rows=1 width=2,465) (actual time=457.552..457.553 rows=1 loops=1)

2. 0.005 457.552 ↑ 1.0 1 1

Nested Loop Left Join (cost=3,777.18..25,207.20 rows=1 width=2,465) (actual time=457.552..457.552 rows=1 loops=1)

3. 0.004 457.539 ↑ 1.0 1 1

Nested Loop (cost=3,776.89..25,206.87 rows=1 width=2,292) (actual time=457.539..457.539 rows=1 loops=1)

4. 1.817 457.500 ↑ 1.0 1 1

Nested Loop (cost=3,776.46..25,204.92 rows=1 width=1,982) (actual time=457.500..457.500 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. 0.695 441.275 ↑ 1.0 1 1

Hash Join (cost=3,776.46..22,819.48 rows=1 width=1,618) (actual time=441.275..441.275 rows=1 loops=1)

  • Hash Cond: ((prop.jailid = b.jailid) AND (prop.bookid = b.bookid))
6. 0.011 0.011 ↑ 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.007..0.011 rows=18 loops=1)

7. 87.335 440.569 ↓ 471.2 49,952 1

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

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

Nested Loop (cost=0.42..3,774.87 rows=106 width=1,374) (actual time=0.021..353.234 rows=49,952 loops=1)

9. 35.443 35.443 ↓ 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.006..35.443 rows=49,952 loops=1)

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

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

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

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

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

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

  • Index Cond: ((convertedid = b.jamin_book_zid) AND (wtrun = 205))
13. 0.008 0.008 ↑ 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=0.008..0.008 rows=1 loops=1)

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