explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wHUH

Settings
# exclusive inclusive rows x rows loops node
1. 110.430 220.373 ↑ 1.0 1 1

Aggregate (cost=24,250.81..24,250.83 rows=1 width=32) (actual time=220.372..220.373 rows=1 loops=1)

  • Output: ((sum(CASE WHEN is_credit THEN ('-1'::numeric * value) ELSE value END) * '-1'::numeric) + '0'::numeric)
  • Buffers: shared hit=5450
2. 105.888 109.943 ↓ 1.2 30,314 1

Bitmap Heap Scan on public.ledger_entry (cost=543.78..24,119.62 rows=26,239 width=6) (actual time=4.864..109.943 rows=30,314 loops=1)

  • Output: id, posted_date, journal_id, account_id, value, is_credit, description, invoice_id, currency, product_id, corrected, correction_for_ledger_entry_id, customer_rebate_id
  • Recheck Cond: (ledger_entry.account_id = 2993)
  • Heap Blocks: exact=5306
  • Buffers: shared hit=5450
3. 4.055 4.055 ↓ 1.6 41,606 1

Bitmap Index Scan on ix_ledger_entry_account_id (cost=0.00..537.22 rows=26,239 width=0) (actual time=4.055..4.055 rows=41,606 loops=1)

  • Index Cond: (ledger_entry.account_id = 2993)
  • Buffers: shared hit=144