explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tATq

Settings
# exclusive inclusive rows x rows loops node
1. 0.472 7.302 ↑ 376.2 8 1

GroupAggregate (cost=5,230.79..5,336.18 rows=3,010 width=54) (actual time=6.753..7.302 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.661 6.830 ↑ 1.6 1,908 1

Sort (cost=5,230.79..5,238.32 rows=3,013 width=79) (actual time=6.716..6.830 rows=1,908 loops=1)

  • Sort Key: module DESC, (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: 317kB
3. 5.169 5.169 ↑ 1.6 1,908 1

Index Scan using index_date_time on invoice_stats inv (cost=0.44..5,056.68 rows=3,013 width=79) (actual time=0.088..5.169 rows=1,908 loops=1)

  • Index Cond: (date_time >= date_trunc('day'::text, now()))
  • Filter: ((module)::text <> 'Release'::text)
  • Rows Removed by Filter: 1022
Planning time : 0.376 ms
Execution time : 7.401 ms