explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CABoV : Optimization for: plan #IGUI

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.006 0.807 ↑ 5.0 10 1

Limit (cost=158,595.03..158,603.41 rows=50 width=1,398) (actual time=0.781..0.807 rows=10 loops=1)

  • subscripti0_.lifecycle_change_date, subscripti0_.cancellation_choice, subscripti0_.cancellation_period, subscripti0_.overdue_amount, subscripti0_.overdue_period, subscripti0_.product_d
2. 0.021 0.801 ↑ 11.4 10 1

Unique (cost=158,595.03..158,614.13 rows=114 width=1,398) (actual time=0.780..0.801 rows=10 loops=1)

3. 0.072 0.780 ↑ 11.4 10 1

Sort (cost=158,595.03..158,595.32 rows=114 width=1,398) (actual time=0.778..0.780 rows=10 loops=1)

  • Sort Key: subscripti0_.creation_date DESC, subscripti0_.id, subscripti0_.version, subscripti0_.modification_date, subscripti0_.object_name, subscripti0_.owner_membership,
  • Sort Method: quicksort Memory: 30kB
4. 0.016 0.708 ↑ 11.4 10 1

Nested Loop (cost=1.12..158,591.14 rows=114 width=1,398) (actual time=0.125..0.708 rows=10 loops=1)

5. 0.102 0.102 ↑ 20.0 10 1

Index Scan using idx_subscription_site on subscription subscripti0_ (cost=0.56..3,230.43 rows=200 width=1,398) (actual time=0.040..0.102 rows=10 loops=1)

  • Index Cond: ((site)::text = 'DtbFJtkOT4Q'::text)
  • Filter: ((begin_period_end_date IS NOT NULL) AND ((lifecycle)::text = 'SUBL.A'::text))
  • Rows Removed by Filter: 43
6. 0.270 0.590 ↑ 3.0 1 10

Index Scan using idx_subscription_entry_subscription on subscription_entry entryassoc1_ (cost=0.56..776.77 rows=3 width=35) (actual time=0.058..0.059 rows=1 loops=10)

  • Index Cond: ((subscription)::text = (subscripti0_.id)::text)
  • Filter: ((period_date < subscripti0_.begin_period_end_date) AND (SubPlan 1))
7.          

SubPlan (forIndex Scan)

8. 0.020 0.320 ↑ 2.0 1 10

GroupAggregate (cost=1.12..81.71 rows=2 width=31) (actual time=0.032..0.032 rows=1 loops=10)

  • Group Key: subscripti2_.subscription
9. 0.100 0.300 ↑ 17.0 1 10

Nested Loop (cost=1.12..81.60 rows=17 width=31) (actual time=0.029..0.030 rows=1 loops=10)

10. 0.130 0.200 ↑ 1.0 1 10

Index Only Scan using subscription_pkey on subscription subscripti3_ (cost=0.56..8.57 rows=1 width=23) (actual time=0.020..0.020 rows=1 loops=10)

  • Index Cond: (id = (subscripti0_.id)::text)
  • Heap Fetches: 10
11. 0.070 0.070 ↑ 17.0 1 10

Index Scan using idx_subscription_entry_subscription on subscription_entry subscripti2_ (cost=0.56..72.86 rows=17 width=31) (actual time=0.007..0.007 rows=1 loops=10)

  • Index Cond: ((subscription)::text = (subscripti0_.id)::text)
Planning time : 0.939 ms
Execution time : 0.924 ms