explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.007 1.739 ↑ 1.0 5 1

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

2. 0.103 1.732 ↑ 14.8 5 1

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

3. 0.004 0.124 ↑ 16.6 5 1

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

4. 0.006 0.070 ↑ 12.0 1 1

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

5. 0.027 0.027 ↑ 109.0 1 1

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

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

Index Scan using ref_people_xperf01 on ref_people (cost=0.42..23.38 rows=1 width=28) (actual time=0.037..0.037 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. 0.050 0.050 ↑ 2.4 5 1

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

  • Index Cond: (id_int = ref_people.id_int)
  • Filter: is_active
8. 0.355 0.355 ↑ 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=0.053..0.071 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.015 1.000 ↑ 1.0 1 5

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

11. 0.985 0.985 ↓ 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=0.020..0.197 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.010 0.150 ↑ 1.0 1 5

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

13. 0.140 0.140 ↓ 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.016..0.028 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