explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qq8w

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 848.088 ↓ 1.7 17 1

Finalize GroupAggregate (cost=35,424.21..35,429.72 rows=10 width=36) (actual time=794.236..848.088 rows=17 loops=1)

  • Group Key: billing_account.currency
2. 46.013 848.122 ↓ 1.9 38 1

Gather Merge (cost=35,424.21..35,429.44 rows=20 width=36) (actual time=794.199..848.122 rows=38 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 20.114 802.109 ↓ 1.3 13 3 / 3

Partial GroupAggregate (cost=34,424.19..34,427.11 rows=10 width=36) (actual time=776.452..802.109 rows=13 loops=3)

  • Group Key: billing_account.currency
4. 23.697 781.995 ↓ 95.0 26,599 3 / 3

Sort (cost=34,424.19..34,424.89 rows=280 width=10) (actual time=776.410..781.995 rows=26,599 loops=3)

  • Sort Key: billing_account.currency
  • Sort Method: quicksort Memory: 1,710kB
  • Worker 0: Sort Method: quicksort Memory: 2,034kB
  • Worker 1: Sort Method: quicksort Memory: 2,302kB
5. 444.150 758.298 ↓ 95.0 26,599 3 / 3

Hash Join (cost=112.82..34,412.81 rows=280 width=10) (actual time=2.720..758.298 rows=26,599 loops=3)

  • Hash Cond: (ledger_entry.account_id = billing_account.id)
6. 313.894 313.894 ↑ 1.2 579,862 3 / 3

Parallel Seq Scan on ledger_entry (cost=0.00..32,397.14 rows=724,814 width=14) (actual time=0.008..313.894 rows=579,862 loops=3)

7. 0.011 0.254 ↓ 1.1 17 3 / 3

Hash (cost=112.63..112.63 rows=15 width=12) (actual time=0.254..0.254 rows=17 loops=3)

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

Bitmap Heap Scan on billing_account (cost=59.46..112.63 rows=15 width=12) (actual time=0.228..0.243 rows=17 loops=3)

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

BitmapAnd (cost=59.46..59.46 rows=15 width=0) (actual time=0.217..0.217 rows=0 loops=3)

10. 0.040 0.040 ↓ 1.1 228 3 / 3

Bitmap Index Scan on billing_account_customer_id_idx (cost=0.00..5.82 rows=204 width=0) (actual time=0.040..0.040 rows=228 loops=3)

  • Index Cond: (customer_id = 175)
11. 0.169 0.169 ↑ 1.0 2,788 3 / 3

Bitmap Index Scan on billing_account_account_group_idx (cost=0.00..53.39 rows=2,813 width=0) (actual time=0.169..0.169 rows=2,788 loops=3)

  • Index Cond: (account_group = 'CUSTOMER_PREPAID_FUNDS'::accountgroupenum)
Planning time : 0.580 ms
Execution time : 855.893 ms