explain.depesz.com

A tool for finding a real cause for slow queries.

Result: rAf

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 1116.199 15064.776 ↓ 9.8 1849 1

GroupAggregate (cost=418.20..720.13 rows=189 width=196) (actual time=13865.351..15064.776 rows=1849 loops=1)

  • Total runtime: 15083.171 ms
2. 13245.122 13948.577 ↓ 2606.4 492604 1

Sort (cost=418.20..418.67 rows=189 width=196) (actual time=13865.058..13948.577 rows=492604 loops=1)

  • Sort Key: a.ent_orse_fch_entrega, d.ent_clie_nom_abrev, a.aud_fch_ins, a.ent_orse_suc_destino, a.ent_ciud_codigo, a.ent_orse_fch_servicio, a.ent_succ_codigo, a.aud_usr_ins, a.ent_orse_estado, c.ent_serv_nombre, a.ent_orse_hra_lle_ini, a.ent_orse_hra_lle_fin, a.ent_orse_hra_lleg_ent, a.ent_orse_hra_sale_ent, a.ent_orse_hra_final, a.ent_orse_hra_inicial, a.ent_orse_nro_ruta, a.ent_clie_codigo, a.ent_orse_tip_movimiento, c.ent_serv_tipo, c.ent_serv_codigo, a.ent_orse_hra_ini_rec, a.ent_orse_hra_fin_rec, a.ent_orse_hra_ini_ent, a.ent_orse_hra_fin_ent
  • Sort Method: quicksort Memory: 143116kB
3. 287.967 703.455 ↓ 2606.4 492604 1

Hash Join (cost=26.75..411.05 rows=189 width=196) (actual time=31.107..703.455 rows=492604 loops=1)

  • Hash Cond: (b.ent_tips_codigo = e.ent_tips_codigo)
4. 381.934 415.433 ↓ 2607.4 492791 1

Hash Join (cost=25.21..406.92 rows=189 width=203) (actual time=31.035..415.433 rows=492791 loops=1)

  • Hash Cond: (b.ent_clie_codigo = a.ent_clie_codigo)
5. 2.491 2.491 ↑ 1.0 10459 1

Seq Scan on ent_succ_sucur_cli b (cost=0.00..340.59 rows=10459 width=17) (actual time=0.008..2.491 rows=10459 loops=1)

6. 3.493 31.008 ↓ 2358.0 2358 1

Hash (cost=25.20..25.20 rows=1 width=206) (actual time=31.008..31.008 rows=2358 loops=1)

7. 1.937 27.515 ↓ 2358.0 2358 1

Nested Loop (cost=0.00..25.20 rows=1 width=206) (actual time=0.151..27.515 rows=2358 loops=1)

8. 3.714 18.504 ↓ 2358.0 2358 1

Nested Loop (cost=0.00..16.92 rows=1 width=180) (actual time=0.135..18.504 rows=2358 loops=1)

9. 7.716 7.716 ↓ 2358.0 2358 1

Index Scan using ent_orse_alt001 on ent_orse_orden_servicio a (cost=0.00..8.64 rows=1 width=152) (actual time=0.085..7.716 rows=2358 loops=1)

  • Index Cond: ((ent_orse_fch_servicio >= '2011-11-02'::date) AND (ent_orse_fch_servicio <= '2011-11-02'::date))
  • Filter: ((ent_serv_codigo <> 4::numeric) AND ((ent_orse_tip_movimiento)::text <> 'I'::text) AND ((ent_orse_estado)::text = ANY ('{T,N,F}'::text[])) AND (ent_serv_codigo <> ALL ('{2,55,111,57,118,48}'::numeric[])))
10. 7.074 7.074 ↑ 1.0 1 2358

Index Scan using ent_clie_pk on ent_clie_cliente d (cost=0.00..8.27 rows=1 width=28) (actual time=0.003..0.003 rows=1 loops=2358)

  • Index Cond: (d.ent_clie_codigo = a.ent_clie_codigo)
11. 7.074 7.074 ↑ 1.0 1 2358

Index Scan using ent_serv_pk on ent_serv_servicio c (cost=0.00..8.27 rows=1 width=32) (actual time=0.002..0.003 rows=1 loops=2358)

  • Index Cond: (c.ent_serv_codigo = a.ent_serv_codigo)
12. 0.028 0.055 ↑ 1.0 24 1

Hash (cost=1.24..1.24 rows=24 width=7) (actual time=0.055..0.055 rows=24 loops=1)

13. 0.027 0.027 ↑ 1.0 24 1

Seq Scan on ent_tips_tipo_sucu e (cost=0.00..1.24 rows=24 width=7) (actual time=0.014..0.027 rows=24 loops=1)