explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vmVe : Optimization for: Optimization for: plan #RIIh; plan #qiPa

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.010 140.812 ↑ 1.0 5 1

Limit (cost=1.26..49,835.60 rows=5 width=170) (actual time=9.401..140.812 rows=5 loops=1)

2. 0.225 140.802 ↑ 14.8 5 1

Nested Loop (cost=1.26..737,549.50 rows=74 width=170) (actual time=9.399..140.802 rows=5 loops=1)

3. 0.009 4.572 ↑ 16.6 5 1

Nested Loop (cost=0.84..2,824.34 rows=83 width=83) (actual time=4.555..4.572 rows=5 loops=1)

4. 0.006 1.981 ↑ 12.0 1 1

Nested Loop (cost=0.42..2,634.48 rows=12 width=83) (actual time=1.980..1.981 rows=1 loops=1)

5. 0.714 0.714 ↑ 109.0 1 1

Seq Scan on top_challenge_list (cost=0.00..84.72 rows=109 width=55) (actual time=0.714..0.714 rows=1 loops=1)

  • Filter: (is_active AND ((template_challenge)::text = 'top_turnover'::text))
  • Rows Removed by Filter: 4
6. 1.261 1.261 ↑ 1.0 1 1

Index Scan using ref_people_xperf01 on ref_people (cost=0.42..23.38 rows=1 width=28) (actual time=1.261..1.261 rows=1 loops=1)

  • Index Cond: (id_int = top_challenge_list.id_int_manager)
  • Filter: (is_active AND (id_statut <> 2) AND (COALESCE(id_qualification, 1) >= 1) AND (id_type = 5))
7. 2.582 2.582 ↑ 2.4 5 1

Index Scan using ref_genealogy_xperf5 on ref_genealogy (cost=0.42..15.70 rows=12 width=8) (actual time=2.570..2.582 rows=5 loops=1)

  • Index Cond: (id_int = ref_people.id_int)
  • Filter: is_active
8. 16.235 16.235 ↑ 1.0 1 5

Index Scan using ref_people_xperf01 on ref_people filleuls (cost=0.42..0.73 rows=1 width=47) (actual time=2.250..3.247 rows=1 loops=5)

  • Index Cond: (id_int = ref_genealogy.id_int_level)
  • Filter: (is_active AND (id_type = ANY ('{5,14}'::integer[])))
  • Rows Removed by Filter: 4
9.          

SubPlan (forNested Loop)

10. 0.030 115.770 ↑ 1.0 1 5

Aggregate (cost=4,897.02..4,897.03 rows=1 width=8) (actual time=23.154..23.154 rows=1 loops=5)

11. 115.740 115.740 ↓ 0.0 0 5

Index Scan using ref_transaction_xperf04 on ref_transaction (cost=0.43..4,897.01 rows=1 width=8) (actual time=1.148..23.148 rows=0 loops=5)

  • Index Cond: (id_int_agent_out = filleuls.id_int)
  • Filter: (is_active AND (date_acte IS NOT NULL) AND (date_acte >= top_challenge_list.date_deb_challenge) AND (date_acte <= top_challenge_list.date_fin_challenge) AND (id_type_transaction = 1))
  • Rows Removed by Filter: 23
12. 0.025 4.000 ↑ 1.0 1 5

Aggregate (cost=5,030.81..5,030.83 rows=1 width=8) (actual time=0.800..0.800 rows=1 loops=5)

13. 3.975 3.975 ↓ 0.0 0 5

Index Scan using ref_transaction_xperf03 on ref_transaction ref_transaction_1 (cost=0.43..5,030.81 rows=1 width=8) (actual time=0.768..0.795 rows=0 loops=5)

  • Index Cond: (id_int_agent_in = filleuls.id_int)
  • Filter: (is_active AND (date_acte IS NOT NULL) AND (date_acte >= top_challenge_list.date_deb_challenge) AND (date_acte <= top_challenge_list.date_fin_challenge) AND (id_type_transaction = 1))
  • Rows Removed by Filter: 11