explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oGUI

Settings
# exclusive inclusive rows x rows loops node
1. 1,346.124 37,869.604 ↑ 405.4 3,254 1

GroupAggregate (cost=1,595,970.68..1,686,700.17 rows=1,319,171 width=62) (actual time=35,306.215..37,869.604 rows=3,254 loops=1)

  • Group Key: (to_date(((date_time)::character varying)::text, 'YYYY-MM-DD'::text)), module, (CASE WHEN ((module)::text = ANY ('{OCR,Validación}'::text[])) THEN 'Documentos'::text ELSE CASE WHEN (number_of_detail_lines > '0'::numeric) THEN 'FacturasconLineas'::text ELSE 'FacturassinLineas'::text END END), (date_part('month'::text, date_time))
2. 11,182.204 36,523.480 ↓ 1.0 3,908,377 1

Sort (cost=1,595,970.68..1,605,595.72 rows=3,850,014 width=87) (actual time=35,306.099..36,523.480 rows=3,908,377 loops=1)

  • Sort Key: (to_date(((date_time)::character varying)::text, 'YYYY-MM-DD'::text)) DESC, module, (CASE WHEN ((module)::text = ANY ('{OCR,Validación}'::text[])) THEN 'Documentos'::text ELSE CASE WHEN (number_of_detail_lines > '0'::numeric) THEN 'FacturasconLineas'::text ELSE 'FacturassinLineas'::text END END), (date_part('month'::text, date_time))
  • Sort Method: external merge Disk: 307784kB
3. 25,341.276 25,341.276 ↓ 1.0 3,908,377 1

Seq Scan on invoice_stats inv (cost=0.00..806,388.83 rows=3,850,014 width=87) (actual time=0.142..25,341.276 rows=3,908,377 loops=1)

  • Filter: (((module)::text <> 'Release'::text) AND (date_time > (now() - '1 year 1 mon'::interval month)))
  • Rows Removed by Filter: 7059744
Planning time : 0.354 ms
Execution time : 37,951.142 ms