explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lq73

Settings
# exclusive inclusive rows x rows loops node
1. 0.419 20,410.868 ↑ 156,935.8 8 1

GroupAggregate (cost=1,404,878.78..1,464,151.11 rows=1,255,486 width=58) (actual time=20,410.400..20,410.868 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. 1.910 20,410.449 ↑ 1,782.6 1,674 1

Sort (cost=1,404,878.78..1,412,339.04 rows=2,984,106 width=83) (actual time=20,410.345..20,410.449 rows=1,674 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: 284kB
3. 20,408.539 20,408.539 ↑ 1,782.6 1,674 1

Seq Scan on invoice_stats inv (cost=0.00..798,362.08 rows=2,984,106 width=83) (actual time=19,210.119..20,408.539 rows=1,674 loops=1)

  • Filter: (((module)::text <> 'Release'::text) AND (date_trunc('day'::text, date_time) >= date_trunc('day'::text, now())))
  • Rows Removed by Filter: 10965214
Planning time : 0.616 ms
Execution time : 20,425.442 ms