explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qiPa : Optimization for: plan #RIIh

Settings

Optimization path:

Optimization(s) for this plan:

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

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

2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.26..737,549.50 rows=74 width=170) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.84..2,824.34 rows=83 width=83) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

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

5. 0.000 0.000 ↓ 0.0

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

  • Filter: (is_active AND ((template_challenge)::text = 'top_turnover'::text))
6. 0.000 0.000 ↓ 0.0

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

  • 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. 0.000 0.000 ↓ 0.0

Index Scan using ref_genealogy_xperf5 on ref_genealogy (cost=0.42..15.70 rows=12 width=8) (actual rows= loops=)

  • Index Cond: (id_int = ref_people.id_int)
  • Filter: is_active
8. 0.000 0.000 ↓ 0.0

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

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

SubPlan (forNested Loop)

10. 0.000 0.000 ↓ 0.0

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

11. 0.000 0.000 ↓ 0.0

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

  • 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))
12. 0.000 0.000 ↓ 0.0

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

13. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (id_int_agent_in = filleuls.id_int)