explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JyZF

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.029 0.160 ↓ 36.0 36 1

Nested Loop Left Join (cost=1.96..5.02 rows=1 width=960) (actual time=0.058..0.160 rows=36 loops=1)

  • Join Filter: (jpasubscri0_.id = subscripti4_.subscription_id)
2. 0.020 0.095 ↓ 12.0 12 1

Nested Loop Left Join (cost=1.96..3.69 rows=1 width=912) (actual time=0.052..0.095 rows=12 loops=1)

3. 0.010 0.063 ↓ 12.0 12 1

Nested Loop Left Join (cost=1.82..3.25 rows=1 width=855) (actual time=0.046..0.063 rows=12 loops=1)

  • Join Filter: (jpasubscri0_.id = modules2_.subscription_id)
4. 0.004 0.043 ↑ 1.0 1 1

Merge Right Join (cost=1.68..1.75 rows=1 width=843) (actual time=0.038..0.043 rows=1 loops=1)

  • Merge Cond: (jpaaccount1_.id = jpasubscri0_.account_id)
5. 0.008 0.030 ↑ 2,614.5 2 1

Merge Left Join (cost=0.55..251.89 rows=5,229 width=780) (actual time=0.026..0.030 rows=2 loops=1)

  • Merge Cond: (jpaaccount1_.id = jpaaccount1_1_.account_id)
6. 0.011 0.011 ↑ 2,614.5 2 1

Index Scan using account_id_idx on account jpaaccount1_ (cost=0.28..218.72 rows=5,229 width=776) (actual time=0.010..0.011 rows=2 loops=1)

7. 0.011 0.011 ↑ 251.5 2 1

Index Only Scan using account_subscription_pkey on account_subscription jpaaccount1_1_ (cost=0.27..13.82 rows=503 width=12) (actual time=0.011..0.011 rows=2 loops=1)

  • Heap Fetches: 2
8. 0.004 0.009 ↑ 1.0 1 1

Sort (cost=1.12..1.13 rows=1 width=63) (actual time=0.009..0.009 rows=1 loops=1)

  • Sort Key: jpasubscri0_.account_id
  • Sort Method: quicksort Memory: 25kB
9. 0.005 0.005 ↑ 1.0 1 1

Seq Scan on subscription jpasubscri0_ (cost=0.00..1.11 rows=1 width=63) (actual time=0.004..0.005 rows=1 loops=1)

  • Filter: (id = '4'::bigint)
  • Rows Removed by Filter: 8
10. 0.010 0.010 ↑ 1.0 12 1

Index Only Scan using module_subscription_PK on module_subscription modules2_ (cost=0.14..1.35 rows=12 width=12) (actual time=0.005..0.010 rows=12 loops=1)

  • Index Cond: (subscription_id = '4'::bigint)
  • Heap Fetches: 12
11. 0.012 0.012 ↑ 1.0 1 12

Index Scan using pk_module on module jpamodule3_ (cost=0.14..0.40 rows=1 width=65) (actual time=0.001..0.001 rows=1 loops=12)

  • Index Cond: (modules2_.module_id = id)
12. 0.036 0.036 ↑ 1.0 3 12

Seq Scan on subscription_application subscripti4_ (cost=0.00..1.30 rows=3 width=24) (actual time=0.001..0.003 rows=3 loops=12)

  • Filter: (subscription_id = '4'::bigint)
  • Rows Removed by Filter: 21