explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gGU

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

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

2. 385.219 2,140.095 ↑ 255,594.0 1 1

Sort (cost=358,622.14..359,261.13 rows=255,594 width=929) (actual time=2,140.095..2,140.095 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,649.609 1,754.876 ↓ 1.1 277,776 1

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

  • Recheck Cond: ("accountId" = 3)
  • Rows Removed by Index Recheck: 818647
  • Filter: ((currency)::text = 'usd'::text)
  • Heap Blocks: exact=39386 lossy=105972
4. 105.267 105.267 ↑ 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=105.267..105.267 rows=277,776 loops=1)

  • Index Cond: ("accountId" = 3)
Planning time : 0.422 ms