explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Nc7p

Settings
# exclusive inclusive rows x rows loops node
1. 5,586.713 5,586.713 ↓ 27.0 27 1

CTE Scan on res (cost=365,894.81..365,894.86 rows=1 width=64) (actual time=5,583.759..5,586.713 rows=27 loops=1)

2.          

CTE res

3. 2.724 5,586.662 ↓ 27.0 27 1

GroupAggregate (cost=365,894.75..365,894.81 rows=1 width=32) (actual time=5,583.750..5,586.662 rows=27 loops=1)

  • Group Key: ((date_trunc('month'::text, vo_all_dead.dt_dead))::date)
4. 0.000 5,583.938 ↓ 4,793.0 4,793 1

Sort (cost=365,894.75..365,894.75 rows=1 width=16) (actual time=5,583.720..5,583.938 rows=4,793 loops=1)

  • Sort Key: ((date_trunc('month'::text, vo_all_dead.dt_dead))::date)
  • Sort Method: quicksort Memory: 417kB
5. 681.280 6,254.211 ↓ 4,793.0 4,793 1

Gather (cost=5,902.38..365,894.74 rows=1 width=16) (actual time=902.654..6,254.211 rows=4,793 loops=1)

  • Workers Planned: 6
  • Workers Launched: 6
6. 1.030 5,572.931 ↓ 685.0 685 7

Result (cost=4,902.38..364,894.65 rows=1 width=16) (actual time=902.213..5,572.931 rows=685 loops=7)

7. 0.165 5,571.901 ↓ 685.0 685 7

Append (cost=4,902.38..364,894.63 rows=1 width=20) (actual time=902.201..5,571.901 rows=685 loops=7)

8. 4,738.342 5,571.736 ↓ 685.0 685 7

Parallel Bitmap Heap Scan on vo_all_dead (cost=4,902.38..364,894.63 rows=1 width=20) (actual time=902.200..5,571.736 rows=685 loops=7)

  • Recheck Cond: ((marque = 'Renault'::text) AND (sous_modele = 'Clio'::text))
  • Rows Removed by Index Recheck: 5154747
  • 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 (energie = 'Gasoline'::text) AND (boite = 'Manual'::text) AND (cylindre = '0.9'::text) AND (generation = 'IV'::text) AND (carrosserie = 'Urban'::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: 456604
  • Heap Blocks: exact=20795 lossy=334643
9. 833.394 833.394 ↓ 9.4 3,201,163 1

Bitmap Index Scan on marque_sous_modele_index_vo_all_dead (cost=0.00..4,902.38 rows=339,481 width=0) (actual time=833.394..833.394 rows=3,201,163 loops=1)

  • Index Cond: ((marque = 'Renault'::text) AND (sous_modele = 'Clio'::text))