explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cLv

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 396.500 ↓ 1.4 14 1

Finalize GroupAggregate (cost=35,454.37..35,462.64 rows=10 width=36) (actual time=375.748..396.500 rows=14 loops=1)

  • Group Key: billing_account.currency
2. 30.765 396.519 ↓ 1.8 36 1

Gather Merge (cost=35,454.37..35,462.37 rows=20 width=36) (actual time=375.723..396.519 rows=36 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 6.871 365.754 ↓ 1.2 12 3 / 3

Partial GroupAggregate (cost=34,454.35..34,460.03 rows=10 width=36) (actual time=357.646..365.754 rows=12 loops=3)

  • Group Key: billing_account.currency
4. 4.722 358.883 ↓ 38.8 10,790 3 / 3

Sort (cost=34,454.35..34,455.04 rows=278 width=10) (actual time=357.628..358.883 rows=10,790 loops=3)

  • Sort Key: billing_account.currency
  • Sort Method: quicksort Memory: 246kB
  • Worker 0: Sort Method: quicksort Memory: 288kB
  • Worker 1: Sort Method: quicksort Memory: 1,945kB
5. 211.917 354.161 ↓ 38.8 10,790 3 / 3

Hash Join (cost=113.07..34,443.06 rows=278 width=10) (actual time=0.560..354.161 rows=10,790 loops=3)

  • Hash Cond: (ledger_entry.account_id = billing_account.id)
6. 141.808 141.808 ↑ 1.3 580,202 3 / 3

Parallel Seq Scan on ledger_entry (cost=0.00..32,425.48 rows=725,448 width=14) (actual time=0.008..141.808 rows=580,202 loops=3)

7. 0.010 0.436 ↓ 1.1 17 3 / 3

Hash (cost=112.89..112.89 rows=15 width=12) (actual time=0.435..0.436 rows=17 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
8. 0.238 0.426 ↓ 1.1 17 3 / 3

Bitmap Heap Scan on billing_account (cost=59.68..112.89 rows=15 width=12) (actual time=0.416..0.426 rows=17 loops=3)

  • Recheck Cond: ((customer_id = 1) AND (account_group = 'CUSTOMER_PREPAID_FUNDS'::accountgroupenum))
  • Heap Blocks: exact=7
9. 0.007 0.188 ↓ 0.0 0 3 / 3

BitmapAnd (cost=59.68..59.68 rows=15 width=0) (actual time=0.188..0.188 rows=0 loops=3)

10. 0.031 0.031 ↓ 1.1 220 3 / 3

Bitmap Index Scan on billing_account_customer_id_idx (cost=0.00..5.83 rows=206 width=0) (actual time=0.031..0.031 rows=220 loops=3)

  • Index Cond: (customer_id = 1)
11. 0.150 0.150 ↑ 1.0 2,822 3 / 3

Bitmap Index Scan on billing_account_account_group_idx (cost=0.00..53.59 rows=2,840 width=0) (actual time=0.150..0.150 rows=2,822 loops=3)

  • Index Cond: (account_group = 'CUSTOMER_PREPAID_FUNDS'::accountgroupenum)
Planning time : 0.517 ms
Execution time : 397.038 ms