explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cWu

Settings
# exclusive inclusive rows x rows loops node
1. 0.432 25,807.372 ↑ 156,924.1 8 1

GroupAggregate (cost=1,509,059.59..1,574,604.51 rows=1,255,393 width=54) (actual time=25,806.975..25,807.372 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), (to_date(((date_time)::character varying)::text, 'YYYY-MM-DD'::text))
2. 1.417 25,806.940 ↑ 2,246.9 1,328 1

Sort (cost=1,509,059.59..1,516,519.30 rows=2,983,886 width=79) (actual time=25,806.860..25,806.940 rows=1,328 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), (to_date(((date_time)::character varying)::text, 'YYYY-MM-DD'::text))
  • Sort Method: quicksort Memory: 235kB
3. 25,805.523 25,805.523 ↑ 2,246.9 1,328 1

Seq Scan on invoice_stats inv (cost=0.00..922,987.14 rows=2,983,886 width=79) (actual time=2,629.133..25,805.523 rows=1,328 loops=1)

  • Filter: (((module)::text <> 'Release'::text) AND (to_date(((date_time)::character varying)::text, 'YYYY-MM-DD'::text) >= to_date(((now())::character varying)::text, 'YYYY-MM-DD'::text)))
  • Rows Removed by Filter: 10964986
Planning time : 0.287 ms
Execution time : 25,810.052 ms