explain.depesz.com

PostgreSQL's explain analyze made readable

Result: W2Z8

Settings
# exclusive inclusive rows x rows loops node
1. 5.355 10,459.202 ↑ 2.2 18,135 1

Append (cost=1.00..15,913.81 rows=39,983 width=150) (actual time=30.879..10,459.202 rows=18,135 loops=1)

2. 5,196.458 6,337.676 ↓ 553.0 3,871 1

Nested Loop (cost=1.00..603.88 rows=7 width=150) (actual time=30.878..6,337.676 rows=3,871 loops=1)

3. 5.647 178.620 ↓ 489.1 7,826 1

Nested Loop (cost=0.71..595.95 rows=16 width=81) (actual time=1.235..178.620 rows=7,826 loops=1)

4. 0.332 28.837 ↓ 28.7 86 1

Nested Loop (cost=0.29..532.16 rows=3 width=81) (actual time=0.611..28.837 rows=86 loops=1)

5. 19.961 19.961 ↓ 1.6 89 1

Seq Scan on top_challenge_list (cost=0.00..109.68 rows=56 width=53) (actual time=0.543..19.961 rows=89 loops=1)

  • Filter: (is_active AND ((template_challenge)::text = 'top_sales'::text) AND (date_fin_challenge >= CURRENT_DATE))
  • Rows Removed by Filter: 1664
6. 8.544 8.544 ↑ 1.0 1 89

Index Scan using ref_people_xperf1 on ref_people (cost=0.29..7.53 rows=1 width=28) (actual time=0.096..0.096 rows=1 loops=89)

  • 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))
7. 144.136 144.136 ↓ 10.1 91 86

Index Scan using ref_genealogy_xperf5 on ref_genealogy (cost=0.42..21.17 rows=9 width=8) (actual time=0.631..1.676 rows=91 loops=86)

  • Index Cond: (id_int = ref_people.id_int)
  • Filter: (is_active AND (level >= 0) AND (level <= 5))
  • Rows Removed by Filter: 16
8. 962.598 962.598 ↓ 0.0 0 7,826

Index Scan using ref_people_xperf1 on ref_people filleuls (cost=0.29..0.37 rows=1 width=41) (actual time=0.122..0.123 rows=0 loops=7,826)

  • Index Cond: (id_int = ref_genealogy.id_int_level)
  • Filter: (is_active AND (id_type = 5))
  • Rows Removed by Filter: 1
9. 3,607.798 4,116.171 ↑ 2.8 14,264 1

Nested Loop (cost=5.31..14,710.19 rows=39,976 width=150) (actual time=3.760..4,116.171 rows=14,264 loops=1)

10. 501.241 501.241 ↑ 1.4 7,132 1

Seq Scan on ref_people ref_people_1 (cost=0.00..3,427.71 rows=9,994 width=41) (actual time=0.068..501.241 rows=7,132 loops=1)

  • Filter: (is_active AND (id_statut <> 2) AND (id_filiale = 2) AND (id_type = 5))
  • Rows Removed by Filter: 30280
11. 7.006 7.132 ↑ 2.0 2 7,132

Materialize (cost=5.31..89.21 rows=4 width=53) (actual time=0.000..0.001 rows=2 loops=7,132)

12. 0.103 0.126 ↑ 2.0 2 1

Bitmap Heap Scan on top_challenge_list top_challenge_list_1 (cost=5.31..89.19 rows=4 width=53) (actual time=0.055..0.126 rows=2 loops=1)

  • Recheck Cond: (id_int_manager IS NULL)
  • Filter: (is_active AND (id_filiale = 2) AND ((template_challenge)::text = 'top_sales'::text) AND (date_fin_challenge >= CURRENT_DATE))
  • Rows Removed by Filter: 135
  • Heap Blocks: exact=16
13. 0.023 0.023 ↑ 1.0 137 1

Bitmap Index Scan on top_challenge_xperf3 (cost=0.00..5.30 rows=137 width=0) (actual time=0.023..0.023 rows=137 loops=1)

  • Index Cond: (id_int_manager IS NULL)
Planning time : 38.381 ms