explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZfRG

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 0.152 ↓ 4.0 4 1

Unique (cost=27.19..27.23 rows=1 width=235) (actual time=0.147..0.152 rows=4 loops=1)

2. 0.016 0.147 ↓ 4.0 4 1

Sort (cost=27.19..27.19 rows=1 width=235) (actual time=0.146..0.147 rows=4 loops=1)

  • Sort Key: payment_method.id, payment_method.name, ((payment_method.type)::text), ((payment_method.method)::text), ((payment_method.liability)::text), payment_method.tenant, payment_method.external_id, payment_method.brand_id, payment_method.digital_wallet_id, payment_method.accept_change, (("group".active AND merchant_group.active AND payment_method.active AND (NOT (alternatives: SubPlan 1 or hashed SubPlan 2)))), brand.id, brand.name, digital_wallet.id, digital_wallet.name
  • Sort Method: quicksort Memory: 25kB
3. 0.015 0.131 ↓ 4.0 4 1

Nested Loop Left Join (cost=14.33..27.18 rows=1 width=235) (actual time=0.077..0.131 rows=4 loops=1)

4. 0.004 0.088 ↓ 4.0 4 1

Nested Loop Left Join (cost=14.20..20.85 rows=1 width=144) (actual time=0.059..0.088 rows=4 loops=1)

5. 0.003 0.076 ↓ 4.0 4 1

Nested Loop (cost=14.06..20.58 rows=1 width=107) (actual time=0.054..0.076 rows=4 loops=1)

6. 0.008 0.065 ↓ 4.0 4 1

Nested Loop (cost=13.92..19.89 rows=1 width=154) (actual time=0.049..0.065 rows=4 loops=1)

7. 0.005 0.049 ↓ 4.0 4 1

Nested Loop (cost=13.78..18.86 rows=1 width=81) (actual time=0.043..0.049 rows=4 loops=1)

8. 0.003 0.034 ↑ 1.0 1 1

Merge Join (cost=11.54..11.56 rows=1 width=49) (actual time=0.031..0.034 rows=1 loops=1)

  • Merge Cond: (merchant_group.group_id = tg.group_id)
9. 0.018 0.018 ↑ 2.0 2 1

Index Scan using merchant_group_pkey on merchant_group (cost=0.43..20.50 rows=4 width=33) (actual time=0.016..0.018 rows=2 loops=1)

  • Index Cond: (merchant_id = '00000e7f-6717-41c3-88c2-ab453c3eb576'::uuid)
10. 0.006 0.013 ↑ 1.0 1 1

Sort (cost=1.07..1.07 rows=1 width=32) (actual time=0.012..0.013 rows=1 loops=1)

  • Sort Key: tg.group_id
  • Sort Method: quicksort Memory: 25kB
11. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on merchant_group_tag tg (cost=0.00..1.06 rows=1 width=32) (actual time=0.007..0.007 rows=1 loops=1)

  • Filter: ((merchant_id = '00000e7f-6717-41c3-88c2-ab453c3eb576'::uuid) AND (tag = 'RIR'::text))
  • Rows Removed by Filter: 3
12. 0.006 0.010 ↑ 3.0 4 1

Bitmap Heap Scan on group_payment_method (cost=2.24..7.18 rows=12 width=32) (actual time=0.009..0.010 rows=4 loops=1)

  • Recheck Cond: (group_id = merchant_group.group_id)
  • Heap Blocks: exact=1
13. 0.004 0.004 ↑ 3.0 4 1

Bitmap Index Scan on group_payment_method_pkey (cost=0.00..2.23 rows=12 width=0) (actual time=0.004..0.004 rows=4 loops=1)

  • Index Cond: (group_id = merchant_group.group_id)
14. 0.008 0.008 ↑ 1.0 1 4

Index Scan using payment_method_pkey on payment_method (cost=0.14..1.02 rows=1 width=89) (actual time=0.002..0.002 rows=1 loops=4)

  • Index Cond: (id = group_payment_method.payment_method_id)
15. 0.008 0.008 ↑ 1.0 1 4

Index Scan using group_pkey on "group" (cost=0.14..0.64 rows=1 width=17) (actual time=0.002..0.002 rows=1 loops=4)

  • Index Cond: (id = group_payment_method.group_id)
16. 0.008 0.008 ↑ 1.0 1 4

Index Scan using brand_pkey on brand (cost=0.14..0.27 rows=1 width=37) (actual time=0.002..0.002 rows=1 loops=4)

  • Index Cond: (id = payment_method.brand_id)
17. 0.004 0.004 ↓ 0.0 0 4

Index Scan using digital_wallet_pkey on digital_wallet (cost=0.13..0.26 rows=1 width=25) (actual time=0.001..0.001 rows=0 loops=4)

  • Index Cond: (id = payment_method.digital_wallet_id)
18. 0.024 0.024 ↓ 0.0 0 4

Seq Scan on merchant_inactive_payment_method (cost=0.00..6.01 rows=1 width=0) (actual time=0.006..0.006 rows=0 loops=4)

  • Filter: ((merchant_id = merchant_group.merchant_id) AND (payment_method_id = payment_method.id))
19.          

SubPlan (for Nested Loop Left Join)

20. 0.000 0.000 ↓ 0.0 0

Seq Scan on merchant_inactive_payment_method merchant_inactive_payment_method_1 (cost=0.00..6.01 rows=1 width=32) (never executed)