explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cbMr

Settings
# exclusive inclusive rows x rows loops node
1. 0.336 52.593 ↓ 107.5 215 1

Nested Loop (cost=7,775.01..8,202.47 rows=2 width=4) (actual time=51.590..52.593 rows=215 loops=1)

2. 0.319 51.847 ↓ 11.4 410 1

Bitmap Heap Scan on account_entry (cost=7,774.72..7,918.95 rows=36 width=8) (actual time=51.555..51.847 rows=410 loops=1)

  • Recheck Cond: (((debet_account_id = 259412) OR (credit_account_id = 259412)) AND (ent_id = 1446))
  • Heap Blocks: exact=165
3. 0.059 51.528 ↓ 0.0 0 1

BitmapAnd (cost=7,774.72..7,774.72 rows=36 width=0) (actual time=51.528..51.528 rows=0 loops=1)

4. 0.000 0.042 ↓ 0.0 0 1

BitmapOr (cost=121.95..121.95 rows=6,507 width=0) (actual time=0.042..0.042 rows=0 loops=1)

5. 0.019 0.019 ↑ 22.0 149 1

Bitmap Index Scan on account_entry_debet_account_id (cost=0.00..61.12 rows=3,273 width=0) (actual time=0.019..0.019 rows=149 loops=1)

  • Index Cond: (debet_account_id = 259412)
6. 0.023 0.023 ↑ 12.4 261 1

Bitmap Index Scan on account_entry_credit_account_id (cost=0.00..60.82 rows=3,233 width=0) (actual time=0.023..0.023 rows=261 loops=1)

  • Index Cond: (credit_account_id = 259412)
7. 51.427 51.427 ↓ 1.0 423,797 1

Bitmap Index Scan on account_entry_ent_id (cost=0.00..7,652.52 rows=413,860 width=0) (actual time=51.427..51.427 rows=423,797 loops=1)

  • Index Cond: (ent_id = 1446)
8. 0.410 0.410 ↑ 1.0 1 410

Index Scan using document_types_pkey on document_types (cost=0.29..7.87 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=410)

  • Index Cond: (id = account_entry.document_type_id)
  • Filter: ((document_code)::text = 'pay_docs_in_document'::text)
  • Rows Removed by Filter: 0
Planning time : 0.561 ms
Execution time : 52.652 ms