explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Igwo : Optimization for: plan #vTKIK

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 1.083 158,949.625 ↑ 1.0 1,000 1

Limit (cost=1.26..526.76 rows=1,000 width=151) (actual time=938.661..158,949.625 rows=1,000 loops=1)

2. 0.855 158,948.542 ↑ 67.8 1,000 1

Append (cost=1.26..35,645.96 rows=67,830 width=151) (actual time=938.658..158,948.542 rows=1,000 loops=1)

3. 155,740.204 158,947.687 ↓ 66.7 1,000 1

Nested Loop (cost=1.26..2,038.44 rows=15 width=151) (actual time=938.656..158,947.687 rows=1,000 loops=1)

4. 2.582 31.428 ↓ 74.7 2,165 1

Nested Loop (cost=0.84..2,006.74 rows=29 width=80) (actual time=4.625..31.428 rows=2,165 loops=1)

5. 0.032 3.051 ↑ 1.0 5 1

Nested Loop (cost=0.42..1,986.63 rows=5 width=80) (actual time=1.209..3.051 rows=5 loops=1)

6. 0.179 0.179 ↑ 13.6 5 1

Seq Scan on top_challenge_list (cost=0.00..66.36 rows=68 width=52) (actual time=0.134..0.179 rows=5 loops=1)

  • Filter: (is_active AND ((template_challenge)::text = 'top_sales'::text) AND (date_fin_challenge >= CURRENT_DATE))
  • Rows Removed by Filter: 53
7. 2.840 2.840 ↑ 1.0 1 5

Index Scan using ref_people_xperf01 on ref_people (cost=0.42..28.23 rows=1 width=28) (actual time=0.513..0.568 rows=1 loops=5)

  • Index Cond: (id_int = top_challenge_list.id_int_manager)
  • Filter: (is_active AND (id_statut <> 2) AND (id_statut <> 2) AND (COALESCE(id_qualification, 1) >= 1) AND (id_type = 5) AND (id_filiale = 2))
  • Rows Removed by Filter: 4
8. 25.795 25.795 ↓ 43.3 433 5

Index Only Scan using ref_genealogy_xperf03 on ref_genealogy (cost=0.42..3.92 rows=10 width=8) (actual time=1.865..5.159 rows=433 loops=5)

  • Index Cond: ((id_int = ref_people.id_int) AND (level >= 0) AND (level <= 5))
  • Heap Fetches: 0
9. 3,176.055 3,176.055 ↓ 0.0 0 2,165

Index Scan using ref_people_xperf01 on ref_people filleuls (cost=0.42..0.94 rows=1 width=43) (actual time=1.053..1.467 rows=0 loops=2,165)

  • Index Cond: (id_int = ref_genealogy.id_int_level)
  • Filter: (is_active AND (id_type = 5))
  • Rows Removed by Filter: 5
10. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.42..32,590.07 rows=67,815 width=151) (never executed)

11. 0.000 0.000 ↓ 0.0 0

Seq Scan on top_challenge_list top_challenge_list_1 (cost=0.00..68.98 rows=5 width=52) (never executed)

  • Filter: ((id_int_manager IS NULL) AND is_active AND (id_filiale = 2) AND ((template_challenge)::text = 'top_sales'::text) AND (date_fin_challenge >= CURRENT_DATE))
12. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.42..13,566.80 rows=13,563 width=43) (never executed)

13. 0.000 0.000 ↓ 0.0 0

Index Scan using ref_people_xperf12 on ref_people ref_people_1 (cost=0.42..13,498.99 rows=13,563 width=43) (never executed)

  • Index Cond: (is_active = true)
  • Filter: (is_active AND (id_statut <> 2) AND (id_filiale = 2) AND (id_type = 5))
Planning time : 23.633 ms