explain.depesz.com

PostgreSQL's explain analyze made readable

Result: u9ZC

Settings
# exclusive inclusive rows x rows loops node
1. 2,407.088 2,407.088 ↑ 1.0 1 1

CTE Scan on res (cost=12,539.55..12,539.60 rows=1 width=64) (actual time=2,407.087..2,407.088 rows=1 loops=1)

2.          

CTE res

3. 0.057 2,407.074 ↑ 1.0 1 1

GroupAggregate (cost=12,539.48..12,539.55 rows=1 width=32) (actual time=2,407.073..2,407.074 rows=1 loops=1)

  • Group Key: ((date_trunc('month'::text, vo_all_dead.dt_dead))::date)
4. 0.017 2,407.017 ↑ 1.0 1 1

Sort (cost=12,539.48..12,539.49 rows=1 width=16) (actual time=2,407.016..2,407.017 rows=1 loops=1)

  • Sort Key: ((date_trunc('month'::text, vo_all_dead.dt_dead))::date)
  • Sort Method: quicksort Memory: 25kB
5. 0.007 2,407.000 ↑ 1.0 1 1

Result (cost=0.57..12,539.47 rows=1 width=16) (actual time=842.938..2,407.000 rows=1 loops=1)

6. 0.002 2,406.993 ↑ 1.0 1 1

Append (cost=0.57..12,539.46 rows=1 width=20) (actual time=842.933..2,406.993 rows=1 loops=1)

7. 2,406.991 2,406.991 ↑ 1.0 1 1

Index Scan using marque_sous_modele_generation_energie_index_vo_all_dead on vo_all_dead (cost=0.57..12,539.46 rows=1 width=20) (actual time=842.931..2,406.991 rows=1 loops=1)

  • Index Cond: ((marque = 'Renault'::text) AND (sous_modele = 'Clio'::text) AND (generation = 'IV'::text) AND (energie = 'Gasoline'::text))
  • Filter: (dead AND pro AND (dt_dead > '2016-12-31 00:00:00+01'::timestamp with time zone) AND (km >= 9000) AND (km <= 33000) AND (boite = 'Manual'::text) AND (cylindre = '0.9'::text) AND (carrosserie = 'Urban'::text) AND (finition = 'intens'::text) AND (id_pays = 'FR'::bpchar) AND (id_veh = ANY ('{219638,219639,219425,219428,219427,219426}'::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: 281893