explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BbAZ

Settings
# exclusive inclusive rows x rows loops node
1. 1.254 163.012 ↓ 145.0 145 1

HashAggregate (cost=326.37..326.39 rows=1 width=91) (actual time=162.830..163.012 rows=145 loops=1)

  • Group Key: nc.bus_ent_inst_name_num, nc.bus_ent_inst_id_auto, nc.att_value_num_7, nc.att_value_10, es.ent_sta_desc, to_char(nc.bus_ent_inst_create_data, 'YYYY-MM-DD HH24:MI:SS'::text), to_date((nc.att_value_5)::text, 'DD-MM-YYYY'::text), (to_timestamp((nc.att_value_5)::text, 'DD-MM-YYYY HH24:MI:SS'::text))::time without time zone, delito.att_value_2, delito.att_value_1, CASE WHEN (nc.att_value_num_8 = '1'::numeric) THEN 'SI'::text ELSE 'NO'::text END, rcor.ent_inst_att_str_value
2. 5.442 161.758 ↓ 145.0 145 1

Nested Loop Left Join (cost=7.37..326.34 rows=1 width=91) (actual time=4.456..161.758 rows=145 loops=1)

  • Join Filter: ((nc.env_id = rcor.env_id) AND (rcor.att_index_id = fistur.att_index_id))
  • Rows Removed by Join Filter: 238
3. 2.027 149.501 ↓ 145.0 145 1

Nested Loop Left Join (cost=6.94..317.86 rows=1 width=92) (actual time=4.205..149.501 rows=145 loops=1)

  • Join Filter: ((nc.env_id = fistur.env_id) AND ((fistur.ent_inst_att_str_value)::text = (nc.att_value_num_2)::text))
  • Rows Removed by Join Filter: 238
4. 7.119 136.164 ↓ 145.0 145 1

Nested Loop Left Join (cost=6.51..309.39 rows=1 width=93) (actual time=4.164..136.164 rows=145 loops=1)

5. 25.485 117.300 ↓ 145.0 145 1

Nested Loop (cost=6.09..300.93 rows=1 width=91) (actual time=4.105..117.300 rows=145 loops=1)

  • Join Filter: (nc.ent_sta_id = es.ent_sta_id_auto)
  • Rows Removed by Join Filter: 10585
6. 25.673 67.310 ↓ 145.0 145 1

Nested Loop (cost=6.09..298.26 rows=1 width=75) (actual time=3.986..67.310 rows=145 loops=1)

  • Join Filter: ((nc.att_value_6)::integer = delito.bus_ent_inst_name_num)
  • Rows Removed by Join Filter: 5201
7. 0.663 0.663 ↓ 3.0 3 1

Index Scan using ix_bus_ent_instance_03 on bus_ent_instance delito (cost=0.42..9.62 rows=1 width=28) (actual time=0.535..0.663 rows=3 loops=1)

  • Index Cond: (((bus_ent_inst_name_pre)::text = 'DFC'::text) AND (bus_ent_id = 1296) AND (env_id = 1001))
  • Filter: ((att_value_1)::text = ANY ('{145,147,148}'::text[]))
  • Rows Removed by Filter: 281
8. 29.034 40.974 ↓ 445.5 1,782 3

Bitmap Heap Scan on bus_ent_instance nc (cost=5.67..288.57 rows=4 width=59) (actual time=4.410..13.658 rows=1,782 loops=3)

  • Recheck Cond: ((bus_ent_id = 1006) AND (att_value_num_5 = '1'::numeric) AND (reg_status = 0) AND (env_id = 1001))
  • Filter: ((bus_ent_inst_name_pre)::text = 'NC'::text)
  • Heap Blocks: exact=1896
9. 11.940 11.940 ↓ 24.9 2,067 3

Bitmap Index Scan on ix_bus_ent_instance_attn_05 (cost=0.00..5.67 rows=83 width=0) (actual time=3.980..3.980 rows=2,067 loops=3)

  • Index Cond: ((bus_ent_id = 1006) AND (att_value_num_5 = '1'::numeric) AND (reg_status = 0) AND (env_id = 1001))
10. 24.505 24.505 ↑ 1.0 74 145

Seq Scan on bus_ent_status es (cost=0.00..1.74 rows=74 width=24) (actual time=0.005..0.169 rows=74 loops=145)

11. 11.745 11.745 ↑ 1.0 1 145

Index Scan using ix_bus_ent_instance_03 on bus_ent_instance fisc (cost=0.42..8.45 rows=1 width=12) (actual time=0.080..0.081 rows=1 loops=145)

  • Index Cond: (((bus_ent_inst_name_pre)::text = 'FIS'::text) AND ((nc.att_value_9)::integer = bus_ent_inst_name_num) AND (bus_ent_id = 1019) AND (nc.env_id = env_id) AND (env_id = 1001))
12. 11.310 11.310 ↓ 2.0 2 145

Index Scan using ix_bus_ent_inst_attr_01 on bus_ent_inst_attribute fistur (cost=0.43..8.45 rows=1 width=23) (actual time=0.075..0.078 rows=2 loops=145)

  • Index Cond: ((fisc.bus_ent_inst_id_auto = bus_ent_inst_id) AND (att_id = 1418) AND (env_id = 1001))
13. 6.815 6.815 ↓ 2.0 2 145

Index Scan using ix_bus_ent_inst_attr_01 on bus_ent_inst_attribute rcor (cost=0.43..8.45 rows=1 width=23) (actual time=0.003..0.047 rows=2 loops=145)

  • Index Cond: ((fisc.bus_ent_inst_id_auto = bus_ent_inst_id) AND (att_id = 3426) AND (env_id = 1001))
Planning time : 25.763 ms
Execution time : 164.310 ms