explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hjX3

Settings
# exclusive inclusive rows x rows loops node
1. 17.008 148.537 ↑ 1.0 1 1

Aggregate (cost=21,898.10..21,898.11 rows=1 width=32) (actual time=148.537..148.537 rows=1 loops=1)

  • Output: ((sum(CASE WHEN is_credit THEN ('-1'::numeric * value) ELSE value END) * '-1'::numeric) + '0'::numeric)
  • Buffers: shared hit=4739
2. 127.563 131.529 ↓ 1.4 23,450 1

Bitmap Heap Scan on public.ledger_entry (cost=356.92..21,812.61 rows=17,096 width=6) (actual time=4.978..131.529 rows=23,450 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=4618
  • Buffers: shared hit=4739
3. 3.966 3.966 ↓ 2.0 34,742 1

Bitmap Index Scan on ix_ledger_entry_account_id (cost=0.00..352.65 rows=17,096 width=0) (actual time=3.966..3.966 rows=34,742 loops=1)

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