explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rZz

Settings
# exclusive inclusive rows x rows loops node
1. 0.012 615,339.172 ↑ 1.0 1 1

Aggregate (cost=64.44..64.45 rows=1 width=8) (actual time=615,339.171..615,339.172 rows=1 loops=1)

  • Output: max(beia_trb.reg_date)
  • Buffers: shared hit=825,893 read=115,167 dirtied=19
2. 38.120 615,339.160 ↓ 0.0 0 1

Nested Loop (cost=1.96..64.43 rows=1 width=8) (actual time=615,339.160..615,339.160 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))
  • Buffers: shared hit=825,893 read=115,167 dirtied=19
3. 40.749 615,029.744 ↓ 45,216.0 45,216 1

Nested Loop (cost=1.53..56.21 rows=1 width=20) (actual time=85.291..615,029.744 rows=45,216 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=690,164 read=115,110 dirtied=19
4. 361.873 614,695.091 ↓ 7,536.0 7,536 1

Nested Loop (cost=1.53..52.50 rows=1 width=16) (actual time=85.268..614,695.091 rows=7,536 loops=1)

  • Output: beia_trb.reg_date, beia_trb.bus_ent_inst_id, beia_prio.bus_ent_inst_id
  • Buffers: shared hit=675,092 read=115,110 dirtied=19
5. 612,100.387 612,100.387 ↓ 26,268.6 131,343 1

Index Scan using ix_bus_ent_inst_attr_03 on public.bus_ent_inst_attribute beia_trb (cost=0.83..24.80 rows=5 width=12) (actual time=12.939..612,100.387 rows=131,343 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.ent_inst_att_str_value)::text = 'Noticia Nueva'::text) AND (beia_trb.env_id = 1,001))
  • Buffers: shared hit=16,908 read=114,811 dirtied=19
6. 2,232.831 2,232.831 ↓ 0.0 0 131,343

Index Only Scan using ix_bus_ent_inst_attr_02 on public.bus_ent_inst_attribute beia_prio (cost=0.70..5.53 rows=1 width=4) (actual time=0.017..0.017 rows=0 loops=131,343)

  • Output: beia_prio.att_id, beia_prio.ent_inst_att_num_value, beia_prio.env_id, beia_prio.bus_ent_inst_id, beia_prio.reg_status
  • Index Cond: ((beia_prio.att_id = 1,427) AND (beia_prio.ent_inst_att_num_value = '1'::numeric) AND (beia_prio.env_id = 1,001) AND (beia_prio.bus_ent_inst_id = beia_trb.bus_ent_inst_id) AND (beia_prio.reg_status = 0))
  • Heap Fetches: 19
  • Buffers: shared hit=658,184 read=299
7. 293.904 293.904 ↑ 1.0 6 7,536

Seq Scan on public.bus_ent_status bes (cost=0.00..3.64 rows=6 width=4) (actual time=0.007..0.039 rows=6 loops=7,536)

  • 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=15,072
8. 271.296 271.296 ↓ 0.0 0 45,216

Index Scan using ix_bus_ent_instance_por_fiscalia on public.bus_ent_instance bei_nc (cost=0.42..8.21 rows=1 width=8) (actual time=0.006..0.006 rows=0 loops=45,216)

  • 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=135,729 read=57
Planning time : 3.590 ms
Execution time : 615,340.796 ms