explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mNFX : original

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

Finalize GroupAggregate (cost=56,267.39..56,273.49 rows=10 width=36) (actual time=259.589..262.662 rows=14 loops=1)

  • Group Key: billing_account.currency
2. 7.048 262.680 ↓ 1.8 35 1

Gather Merge (cost=56,267.39..56,273.22 rows=20 width=36) (actual time=259.572..262.680 rows=35 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 1.961 255.632 ↓ 1.2 12 3 / 3

Partial GroupAggregate (cost=55,267.36..55,270.89 rows=10 width=36) (actual time=252.944..255.632 rows=12 loops=3)

  • Group Key: billing_account.currency
4. 3.077 253.671 ↓ 31.7 10,773 3 / 3

Sort (cost=55,267.36..55,268.21 rows=340 width=10) (actual time=252.928..253.671 rows=10,773 loops=3)

  • Sort Key: billing_account.currency
  • Sort Method: quicksort Memory: 961kB
  • Worker 0: Sort Method: quicksort Memory: 1,067kB
  • Worker 1: Sort Method: quicksort Memory: 449kB
5. 134.289 250.594 ↓ 31.7 10,773 3 / 3

Hash Join (cost=121.14..55,253.07 rows=340 width=10) (actual time=0.284..250.594 rows=10,773 loops=3)

  • Hash Cond: (ledger_entry.account_id = billing_account.id)
6. 116.109 116.109 ↑ 1.3 892,745 3 / 3

Parallel Seq Scan on ledger_entry (cost=0.00..52,178.84 rows=1,124,884 width=14) (actual time=0.007..116.109 rows=892,745 loops=3)

7. 0.007 0.196 ↓ 1.2 17 3 / 3

Hash (cost=120.96..120.96 rows=14 width=12) (actual time=0.195..0.196 rows=17 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
8. 0.015 0.189 ↓ 1.2 17 3 / 3

Bitmap Heap Scan on billing_account (cost=70.19..120.96 rows=14 width=12) (actual time=0.182..0.189 rows=17 loops=3)

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

BitmapAnd (cost=70.19..70.19 rows=14 width=0) (actual time=0.174..0.174 rows=0 loops=3)

10. 0.026 0.026 ↓ 1.1 220 3 / 3

Bitmap Index Scan on billing_account_customer_id_idx (cost=0.00..5.86 rows=209 width=0) (actual time=0.025..0.026 rows=220 loops=3)

  • Index Cond: (customer_id = 1)
11. 0.139 0.139 ↑ 1.0 3,128 3 / 3

Bitmap Index Scan on billing_account_account_group_idx (cost=0.00..64.07 rows=3,171 width=0) (actual time=0.139..0.139 rows=3,128 loops=3)

  • Index Cond: (account_group = 'CUSTOMER_PREPAID_FUNDS'::accountgroupenum)
Planning time : 0.305 ms
Execution time : 263.102 ms