explain.depesz.com

PostgreSQL's explain analyze made readable

Result: i5AD

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

Limit (cost=358,622.14..358,622.14 rows=1 width=929) (actual time=2,189.048..2,189.048 rows=1 loops=1)

2. 393.963 2,189.046 ↑ 255,594.0 1 1

Sort (cost=358,622.14..359,261.13 rows=255,594 width=929) (actual time=2,189.046..2,189.046 rows=1 loops=1)

  • Sort Key: "paymentDate" DESC, (CASE WHEN ((state)::text = 'Pending'::text) THEN 1 ELSE 2 END)
  • Sort Method: top-N heapsort Memory: 25kB
3. 1,671.512 1,795.083 ↓ 1.1 277,776 1

Bitmap Heap Scan on "Payment" (cost=5,363.96..357,344.17 rows=255,594 width=929) (actual time=143.464..1,795.083 rows=277,776 loops=1)

  • Recheck Cond: ("accountId" = 3)
  • Rows Removed by Index Recheck: 818,647
  • Filter: ((currency)::text = 'usd'::text)
  • Heap Blocks: exact=39,386 lossy=105,972
4. 123.571 123.571 ↑ 1.0 277,776 1

Bitmap Index Scan on payment_accountid_index (cost=0.00..5,300.06 rows=286,884 width=0) (actual time=123.571..123.571 rows=277,776 loops=1)

  • Index Cond: ("accountId" = 3)