explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 73N7

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 544,346.847 ↑ 1.0 1 1

Aggregate (cost=28.95..28.96 rows=1 width=8) (actual time=544,346.847..544,346.847 rows=1 loops=1)

  • Output: max(beia_trb.reg_date)
  • Buffers: shared hit=597,815 read=133,755 dirtied=1
2. 24.133 544,346.844 ↓ 0.0 0 1

Nested Loop (cost=1.26..28.95 rows=1 width=8) (actual time=544,346.844..544,346.844 rows=0 loops=1)

  • Output: beia_trb.reg_date
  • Join Filter: ((bes.ent_sta_id_auto = bei_nc.ent_sta_id) AND (beia_trb.bus_ent_inst_id = bei_nc.bus_ent_inst_id_auto))
  • Rows Removed by Join Filter: 6
  • Buffers: shared hit=597,815 read=133,755 dirtied=1
3. 52.080 543,637.343 ↓ 57,114.0 57,114 1

Nested Loop (cost=0.83..20.60 rows=1 width=20) (actual time=10.457..543,637.343 rows=57,114 loops=1)

  • Output: bes.ent_sta_id_auto, beia_trb.reg_date, beia_trb.bus_ent_inst_id, beia_prio.bus_ent_inst_id
  • Buffers: shared hit=426,363 read=133,673 dirtied=1
4. 390.036 543,194.984 ↓ 9,519.0 9,519 1

Nested Loop (cost=0.83..16.90 rows=1 width=16) (actual time=10.443..543,194.984 rows=9,519 loops=1)

  • Output: beia_trb.reg_date, beia_trb.bus_ent_inst_id, beia_prio.bus_ent_inst_id
  • Buffers: shared hit=407,325 read=133,673 dirtied=1
5. 504,860.756 504,860.756 ↓ 132,672.0 132,672 1

Index Scan using ix_bus_ent_inst_attribute_func_problema on public.bus_ent_inst_attribute beia_trb (cost=0.42..8.44 rows=1 width=12) (actual time=0.063..504,860.756 rows=132,672 loops=1)

  • Output: beia_trb.env_id, beia_trb.bus_ent_inst_id, beia_trb.att_id, beia_trb.att_row_id_auto, beia_trb.att_index_id, beia_trb.ent_inst_att_num_value, beia_trb.ent_inst_att_str_value, beia_trb.ent_inst_att_dte_value, beia_trb.ent_i (...)
  • Index Cond: ((beia_trb.att_id = 4,016) AND (beia_trb.env_id = 1,001) AND ((beia_trb.ent_inst_att_str_value)::text = 'Noticia Nueva'::text))
  • Buffers: shared hit=8,237 read=124,555 dirtied=1
6. 37,944.192 37,944.192 ↓ 0.0 0 132,672

Index Scan using ix_bus_ent_inst_attribute_gravedad_grave on public.bus_ent_inst_attribute beia_prio (cost=0.41..8.44 rows=1 width=4) (actual time=0.286..0.286 rows=0 loops=132,672)

  • Output: beia_prio.env_id, beia_prio.bus_ent_inst_id, beia_prio.att_id, beia_prio.att_row_id_auto, beia_prio.att_index_id, beia_prio.ent_inst_att_num_value, beia_prio.ent_inst_att_str_value, beia_prio.ent_inst_att_dte_value, beia_p (...)
  • Index Cond: ((beia_prio.bus_ent_inst_id = beia_trb.bus_ent_inst_id) AND (beia_prio.att_id = 1,055) AND (beia_prio.env_id = 1,001) AND (beia_prio.ent_inst_att_num_value = '3'::numeric))
  • Filter: (beia_prio.reg_status = 0)
  • Buffers: shared hit=399,088 read=9,118
7. 390.279 390.279 ↑ 1.0 6 9,519

Seq Scan on public.bus_ent_status bes (cost=0.00..3.64 rows=6 width=4) (actual time=0.008..0.041 rows=6 loops=9,519)

  • Output: bes.env_id, bes.ent_sta_id_auto, bes.ent_sta_name, bes.ent_sta_desc, bes.prj_id, bes.reg_user, bes.reg_status, bes.reg_date
  • Filter: ((bes.env_id = 1,001) AND (bes.reg_status = 0) AND ((bes.ent_sta_name)::text = ANY ('{NC_DPM,NC_AUTO_ASIGNADA,NC_FORMALIZADO,NC_FORMALIZACION_EN_TRAMITE,NC_EN_JUICIO,NC_MODIFICADA}'::text[])))
  • Rows Removed by Filter: 67
  • Buffers: shared hit=19,038
8. 685.368 685.368 ↓ 0.0 0 57,114

Index Scan using ix_bus_ent_instance_por_fiscalia on public.bus_ent_instance bei_nc (cost=0.42..8.33 rows=1 width=8) (actual time=0.012..0.012 rows=0 loops=57,114)

  • Output: bei_nc.env_id, bei_nc.bus_ent_inst_id_auto, bei_nc.bus_ent_id, bei_nc.bus_ent_inst_name_pos, bei_nc.bus_ent_inst_name_num, bei_nc.bus_ent_inst_name_pre, bei_nc.bus_ent_inst_create_user, bei_nc.bus_ent_inst_create_data, bei_nc.ent_sta_ (...)
  • Index Cond: (((bei_nc.att_value_9)::text = '26'::text) AND (bei_nc.bus_ent_inst_id_auto = beia_prio.bus_ent_inst_id))
  • Filter: ((bei_nc.att_value_num_2 IS NOT NULL) AND ((bei_nc.bus_ent_inst_name_pre)::text = 'NC'::text))
  • Buffers: shared hit=171,452 read=82
Planning time : 9.504 ms
Execution time : 544,347.574 ms