explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SbX12

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=383,002.23..383,013.33 rows=296 width=35) (actual rows= loops=)

2.          

Initplan (for Limit)

3. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.02 rows=1 width=8) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=383,002.21..383,013.31 rows=296 width=35) (actual rows= loops=)

  • Group Key: parent.accountcode
5. 0.000 0.000 ↓ 0.0

Sort (cost=383,002.21..383,002.95 rows=296 width=44) (actual rows= loops=)

  • Sort Key: parent.accountcode DESC
6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=13,421.85..382,990.06 rows=296 width=44) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=13,421.43..381,679.38 rows=16 width=39) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=13,421.00..381,671.88 rows=16 width=20) (actual rows= loops=)

  • Join Filter: (batchbalance.unitid = currency.unitid)
9. 0.000 0.000 ↓ 0.0

Index Scan using currency_unitid_key on currency (cost=0.14..6.45 rows=154 width=4) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Materialize (cost=13,420.86..381,628.51 rows=16 width=18) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=13,420.86..381,628.43 rows=16 width=18) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash Join (cost=13,420.17..377,267.82 rows=3,947 width=16) (actual rows= loops=)

  • Hash Cond: (batch.accountid = account.accountid)
13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..363,601.67 rows=55,257 width=16) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Seq Scan on registertype (cost=0.00..4.06 rows=1 width=2) (actual rows= loops=)

  • Filter: ((registertypecode)::text = 'EpaReceivablePendingBulk'::text)
15. 0.000 0.000 ↓ 0.0

Index Scan using batch_registertypeid_closeddate on batch (cost=0.71..362,397.96 rows=119,965 width=18) (actual rows= loops=)

  • Index Cond: ((registertypeid = registertype.registertypeid) AND (closeddate IS NULL))
  • Filter: (periodbegindate < $0)
16. 0.000 0.000 ↓ 0.0

Hash (cost=12,667.10..12,667.10 rows=60,189 width=16) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..12,667.10 rows=60,189 width=16) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Seq Scan on accounttype (cost=0.00..2.17 rows=1 width=2) (actual rows= loops=)

  • Filter: ((accounttypecode)::text = 'AcquirerAccount'::text)
19. 0.000 0.000 ↓ 0.0

Index Scan using account_accounttypeid_key on account (cost=0.42..11,461.14 rows=120,379 width=18) (actual rows= loops=)

  • Index Cond: (accounttypeid = accounttype.accounttypeid)
20. 0.000 0.000 ↓ 0.0

Index Scan using batchbalance_pkey on batchbalance (cost=0.69..1.08 rows=2 width=18) (actual rows= loops=)

  • Index Cond: (batchid = batch.batchid)
21. 0.000 0.000 ↓ 0.0

Index Scan using account_pkey on account parent (cost=0.42..0.46 rows=1 width=35) (actual rows= loops=)

  • Index Cond: (accountid = account.parentid)
22. 0.000 0.000 ↓ 0.0

Index Scan using unitexchangerate_tui_sd_ed on unitexchangerate (cost=0.42..81.77 rows=15 width=9) (actual rows= loops=)

  • Index Cond: (tounitid = batchbalance.unitid)
  • Filter: (date(startdate) = ('now'::cstring)::date)