explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yTE

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

Finalize GroupAggregate (cost=56,267.39..56,276.89 rows=10 width=36) (actual time=269.263..278.713 rows=14 loops=1)

  • Group Key: billing_account.currency
2. 11.200 278.741 ↓ 1.8 36 1

Gather Merge (cost=56,267.39..56,276.62 rows=20 width=36) (actual time=269.244..278.741 rows=36 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 4.999 267.541 ↓ 1.2 12 3 / 3

Partial GroupAggregate (cost=55,267.36..55,274.29 rows=10 width=36) (actual time=261.671..267.541 rows=12 loops=3)

  • Group Key: billing_account.currency
4. 3.818 262.542 ↓ 31.7 10,773 3 / 3

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

  • Sort Key: billing_account.currency
  • Sort Method: quicksort Memory: 852kB
  • Worker 0: Sort Method: quicksort Memory: 862kB
  • Worker 1: Sort Method: quicksort Memory: 954kB
5. 139.372 258.724 ↓ 31.7 10,773 3 / 3

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

  • Hash Cond: (ledger_entry.account_id = billing_account.id)
6. 119.095 119.095 ↑ 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.008..119.095 rows=892,745 loops=3)

7. 0.008 0.257 ↓ 1.2 17 3 / 3

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

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

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

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

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

10. 0.035 0.035 ↓ 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.035..0.035 rows=220 loops=3)

  • Index Cond: (customer_id = 1)
11. 0.182 0.182 ↑ 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.182..0.182 rows=3,128 loops=3)

  • Index Cond: (account_group = 'CUSTOMER_PREPAID_FUNDS'::accountgroupenum)
Planning time : 0.893 ms
Execution time : 279.235 ms