explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4pBS : Optimization for: Optimization for: plan #vTKIK; plan #Igwo

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 1.156 84,840.327 ↑ 1.0 1,000 1

Limit (cost=1.26..526.76 rows=1,000 width=151) (actual time=121.582..84,840.327 rows=1,000 loops=1)

2. 0.889 84,839.171 ↑ 67.8 1,000 1

Append (cost=1.26..35,645.96 rows=67,830 width=151) (actual time=121.580..84,839.171 rows=1,000 loops=1)

3. 82,765.252 84,838.282 ↓ 66.7 1,000 1

Nested Loop (cost=1.26..2,038.44 rows=15 width=151) (actual time=121.579..84,838.282 rows=1,000 loops=1)

4. 2.723 24.940 ↓ 74.7 2,165 1

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

5. 0.026 1.722 ↑ 1.0 5 1

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

6. 0.121 0.121 ↑ 13.6 5 1

Seq Scan on top_challenge_list (cost=0.00..66.36 rows=68 width=52) (actual time=0.061..0.121 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. 1.575 1.575 ↑ 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.287..0.315 rows=1 loops=5)

  • 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_statut <> 2) AND (id_type = 5) AND (id_filiale = 2))
  • Rows Removed by Filter: 4
8. 20.495 20.495 ↓ 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=0.659..4.099 rows=433 loops=5)

  • Index Cond: ((id_int = ref_people.id_int) AND (level >= 0) AND (level <= 5))
  • Heap Fetches: 0
9. 2,048.090 2,048.090 ↓ 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=0.649..0.946 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 : 16.096 ms