explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dYEw : Optimization for: plan #J5VP

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 4.927 524.212 ↑ 2.3 7,425 1

HashAggregate (cost=87,335.99..87,508.58 rows=17,259 width=17) (actual time=523.134..524.212 rows=7,425 loops=1)

2. 2.908 519.285 ↑ 1.5 11,351 1

Nested Loop (cost=0.43..87,249.69 rows=17,259 width=17) (actual time=438.097..519.285 rows=11,351 loops=1)

3. 446.761 446.761 ↓ 1.0 17,404 1

Seq Scan on receipts r (cost=0.00..57,140.72 rows=17,323 width=12) (actual time=437.208..446.761 rows=17,404 loops=1)

  • Filter: (is_deposit AND (tpa_id IS NULL))
  • Rows Removed by Filter: 1,656,385
4. 69.616 69.616 ↑ 1.0 1 17,404

Index Scan using bill_receipts_receipt_no_index on bill_receipts br (cost=0.43..1.73 rows=1 width=29) (actual time=0.004..0.004 rows=1 loops=17,404)

  • Index Cond: ((receipt_no)::text = (r.receipt_id)::text)
Total runtime : 524.674 ms