explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aLq1

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

GroupAggregate (cost=279,831.88..280,106.69 rows=28 width=62) (actual rows= loops=)

  • Group Key: payout_zones.zone_code, transaction_statuses.name
2. 0.000 0.000 ↓ 0.0

Sort (cost=279,831.88..279,900.50 rows=27,446 width=36) (actual rows= loops=)

  • Sort Key: payout_zones.zone_code, transaction_statuses.name
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,004.86..277,808.52 rows=27,446 width=36) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Seq Scan on transaction_statuses (cost=0.00..1.41 rows=1 width=18) (actual rows= loops=)

  • Filter: (id = 21)
5. 0.000 0.000 ↓ 0.0

Gather (cost=1,004.86..277,532.65 rows=27,446 width=26) (actual rows= loops=)

  • Workers Planned: 2
6. 0.000 0.000 ↓ 0.0

Hash Join (cost=4.86..273,788.05 rows=11,436 width=26) (actual rows= loops=)

  • Hash Cond: (merchants.payout_zone_id = payout_zones.id)
7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.56..273,590.34 rows=21,347 width=14) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.13..263,952.65 rows=21,347 width=14) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Parallel Index Scan using transaction_events_current_status_id_transaction_id_idx on transaction_events (cost=0.56..160,729.94 rows=21,347 width=14) (actual rows= loops=)

  • Index Cond: (current_status_id = 21)
  • Filter: ((event_type)::text = 'PAYOUT'::text)
10. 0.000 0.000 ↓ 0.0

Index Only Scan using transactions_id_merchant_id_idx on transactions (cost=0.57..4.84 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = transaction_events.transaction_id)
11. 0.000 0.000 ↓ 0.0

Index Scan using merchants_pkey on merchants (cost=0.43..0.45 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = transactions.merchant_id)
12. 0.000 0.000 ↓ 0.0

Hash (cost=3.11..3.11 rows=15 width=24) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.75..3.11 rows=15 width=24) (actual rows= loops=)

  • Hash Cond: (payout_zones.id = payout_zones_1.id)
14. 0.000 0.000 ↓ 0.0

Seq Scan on payout_zones (cost=0.00..1.28 rows=28 width=20) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Hash (cost=1.56..1.56 rows=15 width=4) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Seq Scan on payout_zones payout_zones_1 (cost=0.00..1.56 rows=15 width=4) (actual rows= loops=)

  • Filter: (active AND migrated AND ((zone_code)::text <> ALL ('{EU-EUR-PRE-PAID,UK-GBP-PRE-PAID}'::text[])) AND ((zone_code)::text <> 'CL-CLP-TRANSBANK'::text) AND (lower((currency_code)::text) <> 'brl'::text))