explain.depesz.com

PostgreSQL's explain analyze made readable

Result: snI

Settings
# exclusive inclusive rows x rows loops node
1. 0.457 23,688.345 ↑ 156,935.8 8 1

GroupAggregate (cost=1,404,878.78..1,464,151.11 rows=1,255,486 width=58) (actual time=23,687.848..23,688.345 rows=8 loops=1)

  • Group Key: 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_trunc('day'::text, date_time))
2. 2.004 23,687.888 ↑ 1,777.3 1,679 1

Sort (cost=1,404,878.78..1,412,339.04 rows=2,984,106 width=83) (actual time=23,687.794..23,687.888 rows=1,679 loops=1)

  • Sort Key: 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_trunc('day'::text, date_time))
  • Sort Method: quicksort Memory: 285kB
3. 23,685.884 23,685.884 ↑ 1,777.3 1,679 1

Seq Scan on invoice_stats inv (cost=0.00..798,362.08 rows=2,984,106 width=83) (actual time=22,127.110..23,685.884 rows=1,679 loops=1)

  • Filter: (((module)::text <> 'Release'::text) AND (date_trunc('day'::text, date_time) >= date_trunc('day'::text, now())))
  • Rows Removed by Filter: 10965228
Planning time : 0.339 ms
Execution time : 23,688.470 ms