explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Mkf

Settings
# exclusive inclusive rows x rows loops node
1. 975.053 975.053 ↓ 27.0 27 1

CTE Scan on res (cost=18,294.25..18,294.30 rows=1 width=64) (actual time=970.798..975.053 rows=27 loops=1)

2.          

CTE res

3. 3.879 974.985 ↓ 27.0 27 1

GroupAggregate (cost=18,294.19..18,294.25 rows=1 width=32) (actual time=970.787..974.985 rows=27 loops=1)

  • Group Key: ((date_trunc('month'::text, vo_all_dead.dt_dead))::date)
4. 1.956 971.106 ↓ 5,554.0 5,554 1

Sort (cost=18,294.19..18,294.19 rows=1 width=16) (actual time=970.747..971.106 rows=5,554 loops=1)

  • Sort Key: ((date_trunc('month'::text, vo_all_dead.dt_dead))::date)
  • Sort Method: quicksort Memory: 453kB
5. 3.521 969.150 ↓ 5,554.0 5,554 1

Result (cost=0.57..18,294.18 rows=1 width=16) (actual time=0.779..969.150 rows=5,554 loops=1)

6. 0.490 965.629 ↓ 5,554.0 5,554 1

Append (cost=0.57..18,294.16 rows=1 width=20) (actual time=0.774..965.629 rows=5,554 loops=1)

7. 965.139 965.139 ↓ 5,554.0 5,554 1

Index Scan using marque_sous_modele_generation_energie_index_vo_all_dead on vo_all_dead (cost=0.57..18,294.16 rows=1 width=20) (actual time=0.773..965.139 rows=5,554 loops=1)

  • Index Cond: ((marque = 'Renault'::text) AND (sous_modele = 'Clio'::text) AND (generation = 'IV'::text) AND (energie = 'Diesel'::text))
  • Filter: (dead AND pro AND (dt_dead > '2016-12-31 00:00:00+01'::timestamp with time zone) AND (finition ~~* 'intens'::text) AND (km >= 9000) AND (km <= 33000) AND (boite = 'Manual'::text) AND (cylindre = '1.5'::text) AND (carrosserie = 'Urban'::text) AND (id_pays = 'FR'::bpchar) AND (id_veh = ANY ('{219169,219616,219168,219166}'::integer[])) AND ((dt_dead - (dt_mec)::timestamp with time zone) <= '1 year 6 mons'::interval) AND ((dt_dead - (dt_mec)::timestamp with time zone) >= '6 mons'::interval))
  • Rows Removed by Filter: 409788