explain.depesz.com

PostgreSQL's explain analyze made readable

Result: W2W

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 746.464 ↓ 0.0 0 1

Limit (cost=3,777.18..27,420.95 rows=1 width=2,465) (actual time=746.464..746.464 rows=0 loops=1)

2. 0.000 746.463 ↓ 0.0 0 1

Nested Loop Left Join (cost=3,777.18..27,420.95 rows=1 width=2,465) (actual time=746.463..746.463 rows=0 loops=1)

3. 0.001 746.463 ↓ 0.0 0 1

Nested Loop (cost=3,776.89..27,420.62 rows=1 width=2,292) (actual time=746.463..746.463 rows=0 loops=1)

4. 5.741 746.462 ↓ 0.0 0 1

Nested Loop (cost=3,776.46..27,417.64 rows=1 width=1,982) (actual time=746.462..746.462 rows=0 loops=1)

  • Join Filter: ((prop.jailid = pr.jailid) AND (prop.bookid = pr.bookid) AND (prop.ord = pr.ord))
  • Rows Removed by Join Filter: 69,316
5. 264.923 698.235 ↓ 2.0 2 1

Hash Join (cost=3,776.46..25,032.20 rows=1 width=1,618) (actual time=628.991..698.235 rows=2 loops=1)

  • Hash Cond: ((prop.jailid = b.jailid) AND (prop.bookid = b.bookid) AND (prop.id = b.id))
6. 69.818 69.818 ↑ 1.0 590,058 1

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

7. 115.872 363.494 ↓ 471.2 49,952 1

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

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

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

9. 36.131 36.131 ↓ 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.014..36.131 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. 42.486 42.486 ↓ 78.8 34,658 2

Seq Scan on jamin_proprec pr (cost=0.00..2,377.74 rows=440 width=364) (actual time=0.017..21.243 rows=34,658 loops=2)

  • Filter: (type = 'RB'::text)
  • Rows Removed by Filter: 53,321
12. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_pt_people_names_convertedid_wtrun on pt_people_names pt_pn (cost=0.43..2.97 rows=1 width=310) (never executed)

  • Index Cond: ((convertedid = b.jamin_book_zid) AND (wtrun = 205))
13. 0.000 0.000 ↓ 0.0 0

Index Scan using jamin_releas_jailid_bookid_idx on jamin_releas prop_rel (cost=0.29..0.32 rows=1 width=173) (never executed)

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