explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nWYY

Settings
# exclusive inclusive rows x rows loops node
1. 40.237 116.344 ↑ 1.0 1 1

Aggregate (cost=24,080.56..24,080.57 rows=1 width=32) (actual time=116.344..116.344 rows=1 loops=1)

  • Output: ((sum(CASE WHEN is_credit THEN ('-1'::numeric * value) ELSE value END) * '-1'::numeric) + '0'::numeric)
  • Buffers: shared hit=5,235
2. 67.720 76.107 ↓ 1.1 28,304 1

Bitmap Heap Scan on public.ledger_entry (cost=537.51..23,950.82 rows=25,946 width=6) (actual time=9.129..76.107 rows=28,304 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 = 2,993)
  • Filter: (ledger_entry.id > '-1'::integer)
  • Heap Blocks: exact=5,098
  • Buffers: shared hit=5,235
3. 8.387 8.387 ↓ 1.5 39,596 1

Bitmap Index Scan on ix_ledger_entry_account_id (cost=0.00..531.02 rows=25,946 width=0) (actual time=8.387..8.387 rows=39,596 loops=1)

  • Index Cond: (ledger_entry.account_id = 2,993)
  • Buffers: shared hit=137