explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WOU1

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 1,219.746 ↑ 1.0 1 1

Limit (cost=32,556.97..32,556.98 rows=1 width=1,804) (actual time=1,219.745..1,219.746 rows=1 loops=1)

2. 0.177 1,219.744 ↑ 1.0 1 1

Sort (cost=32,556.97..32,556.98 rows=1 width=1,804) (actual time=1,219.744..1,219.744 rows=1 loops=1)

  • Sort Key: ar_payment.id DESC
  • Sort Method: top-N heapsort Memory: 27kB
3. 0.142 1,219.567 ↓ 62.0 62 1

Nested Loop (cost=29,765.80..32,556.96 rows=1 width=1,804) (actual time=894.577..1,219.567 rows=62 loops=1)

4. 0.324 1,218.459 ↓ 161.0 161 1

Nested Loop (cost=29,765.23..32,555.38 rows=1 width=1,521) (actual time=894.554..1,218.459 rows=161 loops=1)

5. 364.839 1,217.169 ↓ 3.2 161 1

Bitmap Heap Scan on ar_payment_billings ar_payment_billing (cost=29,764.66..32,422.78 rows=51 width=778) (actual time=894.523..1,217.169 rows=161 loops=1)

  • Recheck Cond: (((check_account_number_encrypted)::text = 'Fag6XhJ00iID7uuH5LBKe2x2pY53XEwcs9UkpMLyKkA='::text) AND ((check_routing_number)::text = '256074974'::text))
  • Filter: ((cid = 3,482) AND (check_is_money_order = 0))
  • Rows Removed by Filter: 194,447
  • Heap Blocks: exact=161,194
6. 31.154 852.330 ↓ 0.0 0 1

BitmapAnd (cost=29,764.66..29,764.66 rows=2,606 width=0) (actual time=852.330..852.330 rows=0 loops=1)

7. 47.994 47.994 ↑ 1.0 194,802 1

Bitmap Index Scan on idx_check_account_number_encrypted (cost=0.00..3,016.93 rows=199,498 width=0) (actual time=47.994..47.994 rows=194,802 loops=1)

  • Index Cond: ((check_account_number_encrypted)::text = 'Fag6XhJ00iID7uuH5LBKe2x2pY53XEwcs9UkpMLyKkA='::text)
8. 773.182 773.182 ↑ 1.0 2,366,324 1

Bitmap Index Scan on ar_payment_billings_check_routing_number_idx (cost=0.00..26,747.45 rows=2,369,184 width=0) (actual time=773.182..773.182 rows=2,366,324 loops=1)

  • Index Cond: ((check_routing_number)::text = '256074974'::text)
9. 0.966 0.966 ↑ 1.0 1 161

Index Scan using idx_ar_payment_details_cid_arpayment_id on ar_payment_details ar_payment_detail (cost=0.57..2.59 rows=1 width=743) (actual time=0.006..0.006 rows=1 loops=161)

  • Index Cond: ((cid = 3,482) AND (ar_payment_id = ar_payment_billing.ar_payment_id))
10. 0.966 0.966 ↓ 0.0 0 161

Index Scan using pk_ar_payments on ar_payments ar_payment (cost=0.57..1.59 rows=1 width=307) (actual time=0.006..0.006 rows=0 loops=161)

  • Index Cond: (id = ar_payment_detail.ar_payment_id)
  • Filter: ((customer_id IS NOT NULL) AND (payment_status_type_id = ANY ('{6,10}'::integer[])) AND (id <> 1449460824) AND (cid = 3,482) AND (payment_type_id = ANY ('{9,4,14}'::integer[])))
  • Rows Removed by Filter: 1
Planning time : 1.387 ms
Execution time : 1,223.799 ms