explain.depesz.com

PostgreSQL's explain analyze made readable

Result: X9Nu

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 2,219.639 ↑ 1.0 1 1

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

2. 412.180 2,219.638 ↑ 255,594.0 1 1

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

Bitmap Heap Scan on "Payment" (cost=5,363.96..357,344.17 rows=255,594 width=929) (actual time=125.115..1,807.458 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. 110.119 110.119 ↑ 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=110.119..110.119 rows=277,776 loops=1)

  • Index Cond: ("accountId" = 3)