explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Gz7 : Optimization for: plan #2Vk7

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 15.584 ↑ 1.1 14 1

Finalize GroupAggregate (cost=44,328.20..44,332.38 rows=16 width=36) (actual time=15.557..15.584 rows=14 loops=1)

  • Group Key: currency
2. 6.070 17.255 ↓ 1.1 36 1

Gather Merge (cost=44,328.20..44,331.94 rows=32 width=36) (actual time=15.548..17.255 rows=36 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.026 11.185 ↑ 1.3 12 3 / 3

Sort (cost=43,328.18..43,328.22 rows=16 width=36) (actual time=11.184..11.185 rows=12 loops=3)

  • Sort Key: currency
  • Sort Method: quicksort Memory: 25kB
  • Worker 0: Sort Method: quicksort Memory: 26kB
  • Worker 1: Sort Method: quicksort Memory: 26kB
4. 6.052 11.159 ↑ 1.3 12 3 / 3

Partial HashAggregate (cost=43,327.66..43,327.86 rows=16 width=36) (actual time=11.151..11.159 rows=12 loops=3)

  • Group Key: currency
5. 4.393 5.107 ↑ 1.5 10,773 3 / 3

Parallel Bitmap Heap Scan on ledger_entry (cost=776.59..43,051.72 rows=15,768 width=10) (actual time=0.932..5.107 rows=10,773 loops=3)

  • Recheck Cond: (account_id = ANY ('{14,541,6786,7480,48,50,52,54,56,58,2659,4107,12502,13860,13862,13864,10634}'::bigint[]))
  • Heap Blocks: exact=2,072
6. 0.714 0.714 ↑ 1.2 32,319 1 / 3

Bitmap Index Scan on ix_ledger_entry_account_id (cost=0.00..767.12 rows=37,842 width=0) (actual time=2.143..2.143 rows=32,319 loops=1)

  • Index Cond: (account_id = ANY ('{14,541,6786,7480,48,50,52,54,56,58,2659,4107,12502,13860,13862,13864,10634}'::bigint[]))
Planning time : 0.137 ms
Execution time : 17.434 ms