explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cKd8

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

Finalize GroupAggregate (cost=58,802.04..58,808.30 rows=10 width=36) (actual time=281.113..284.256 rows=14 loops=1)

  • Group Key: billing_account.currency
2. 7.590 284.276 ↓ 1.8 35 1

Gather Merge (cost=58,802.04..58,808.02 rows=20 width=36) (actual time=281.098..284.276 rows=35 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 2.035 276.686 ↓ 1.2 12 3 / 3

Partial GroupAggregate (cost=57,802.02..57,805.69 rows=10 width=36) (actual time=273.905..276.686 rows=12 loops=3)

  • Group Key: billing_account.currency
4. 3.125 274.651 ↓ 30.3 10,773 3 / 3

Sort (cost=57,802.02..57,802.90 rows=355 width=10) (actual time=273.889..274.651 rows=10,773 loops=3)

  • Sort Key: billing_account.currency
  • Sort Method: quicksort Memory: 937kB
  • Worker 0: Sort Method: quicksort Memory: 448kB
  • Worker 1: Sort Method: quicksort Memory: 1,091kB
5. 146.373 271.526 ↓ 30.3 10,773 3 / 3

Hash Join (cost=135.82..57,786.98 rows=355 width=10) (actual time=0.305..271.526 rows=10,773 loops=3)

  • Hash Cond: (ledger_entry.account_id = billing_account.id)
6. 124.935 124.935 ↑ 1.3 930,660 3 / 3

Parallel Seq Scan on ledger_entry (cost=0.00..54,591.38 rows=1,165,538 width=14) (actual time=0.007..124.935 rows=930,660 loops=3)

7. 0.008 0.218 ↓ 1.1 17 3 / 3

Hash (cost=135.62..135.62 rows=16 width=12) (actual time=0.217..0.218 rows=17 loops=3)

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

Bitmap Heap Scan on billing_account (cost=77.62..135.62 rows=16 width=12) (actual time=0.196..0.210 rows=17 loops=3)

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

BitmapAnd (cost=77.62..77.62 rows=16 width=0) (actual time=0.187..0.187 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..6.08 rows=238 width=0) (actual time=0.026..0.026 rows=220 loops=3)

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

Bitmap Index Scan on billing_account_account_group_idx (cost=0.00..71.28 rows=3,599 width=0) (actual time=0.150..0.150 rows=3,128 loops=3)

  • Index Cond: (account_group = 'CUSTOMER_PREPAID_FUNDS'::accountgroupenum)
Planning time : 0.341 ms
Execution time : 284.765 ms