explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SI4n : RDS Explain

Settings
# exclusive inclusive rows x rows loops node
1. 0.290 1,381.379 ↑ 1.0 500 1

Limit (cost=19.90..4,971.41 rows=500 width=40) (actual time=0.637..1,381.379 rows=500 loops=1)

2. 6.014 1,381.089 ↑ 285.2 500 1

Nested Loop Anti Join (cost=19.90..1,412,338.67 rows=142,615 width=40) (actual time=0.637..1,381.089 rows=500 loops=1)

3. 2.750 303.151 ↑ 57.8 3,646 1

Hash Anti Join (cost=19.34..409,472.73 rows=210,775 width=24) (actual time=0.491..303.151 rows=3,646 loops=1)

  • Hash Cond: (r.requestid = pbr.requestid)
4. 58.934 300.384 ↑ 57.8 3,646 1

Hash Join (cost=18.03..406,810.38 rows=210,776 width=24) (actual time=0.458..300.384 rows=3,646 loops=1)

  • Hash Cond: ((r.requestersymbol)::text = (p.institutionsymbol)::text)
  • Join Filter: ((date_part('epoch'::text, age((('now'::cstring)::date)::timestamp without time zone, r.closeddate)) / '2628000'::double precision) > (p.patrondataretentionmonths)::double precision)
  • Rows Removed by Join Filter: 14789
5. 241.068 241.068 ↑ 35.7 118,648 1

Seq Scan on request r (cost=0.00..371,948.85 rows=4,232,985 width=20) (actual time=0.014..241.068 rows=118,648 loops=1)

6. 0.177 0.382 ↑ 1.0 579 1

Hash (cost=10.79..10.79 rows=579 width=8) (actual time=0.381..0.382 rows=579 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 31kB
7. 0.205 0.205 ↑ 1.0 579 1

Seq Scan on patronsettings p (cost=0.00..10.79 rows=579 width=8) (actual time=0.010..0.205 rows=579 loops=1)

8. 0.005 0.017 ↑ 1.0 14 1

Hash (cost=1.14..1.14 rows=14 width=8) (actual time=0.017..0.017 rows=14 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
9. 0.012 0.012 ↑ 1.0 14 1

Seq Scan on patronpurgeblacklistedrequest pbr (cost=0.00..1.14 rows=14 width=8) (actual time=0.007..0.012 rows=14 loops=1)

10. 1,071.924 1,071.924 ↑ 2.0 1 3,646

Index Only Scan using event_requestid_eventtype_idx on event e (cost=0.56..8.01 rows=2 width=8) (actual time=0.294..0.294 rows=1 loops=3,646)

  • Index Cond: ((requestid = r.requestid) AND (eventtype = 'PATRON_DATA_PURGE'::text))
  • Heap Fetches: 3146