explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qqoY

Settings
# exclusive inclusive rows x rows loops node
1. 21.055 110.285 ↑ 1.0 1 1

Aggregate (cost=24,112.70..24,112.71 rows=1 width=32) (actual time=110.285..110.285 rows=1 loops=1)

  • Output: ((sum(CASE WHEN is_credit THEN ('-1'::numeric * value) ELSE value END) * '-1'::numeric) + '0'::numeric)
  • Buffers: shared hit=5262
2. 62.041 89.230 ↓ 1.1 28,583 1

Bitmap Heap Scan on public.ledger_entry (cost=541.75..23,982.81 rows=25,977 width=6) (actual time=29.449..89.230 rows=28,583 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)
  • Filter: (ledger_entry.id > '-1'::integer)
  • Heap Blocks: exact=5124
  • Buffers: shared hit=5262
3. 27.189 27.189 ↓ 1.5 39,875 1

Bitmap Index Scan on ix_ledger_entry_account_id (cost=0.00..535.25 rows=25,977 width=0) (actual time=27.189..27.189 rows=39,875 loops=1)

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