explain.depesz.com

PostgreSQL's explain analyze made readable

Result: r8sY

Settings
# exclusive inclusive rows x rows loops node
1. 2.430 488.717 ↓ 57.0 228 1

HashAggregate (cost=452.55..460.37 rows=4 width=161) (actual time=488.327..488.717 rows=228 loops=1)

  • Group Key: nc.bus_ent_inst_name_num, nc.att_value_8, nc.bus_ent_inst_id_auto, fisc.bus_ent_inst_id_auto, sol.bus_ent_inst_id_auto, audi_att.att_index_id, audi_att.ent_inst_att_num_value, audi.bus_ent_inst_name_pre, audi.bus_ent_inst_id_auto, CASE WHEN (audi.att_value_num_3 = '1'::numeric) THEN 'Si'::text ELSE 'No'::text END, (SubPlan 1), to_char(audi.bus_ent_inst_create_data, 'YYYY-MM-DD HH24:MI:SS'::text), to_date((nc.att_value_5)::text, 'DD-MM-YYYY'::text), (SubPlan 2), delito.att_value_2, delito.att_value_1, acci.att_value_1, acci.att_value_num_1, fisc.att_value_1, nc.att_value_num_2, es.ent_sta_desc, depto2.att_value_1, nc.att_value_num_7, nc.att_value_10
2. 7.813 486.287 ↓ 57.0 228 1

Nested Loop Left Join (cost=11.60..452.31 rows=4 width=161) (actual time=86.162..486.287 rows=228 loops=1)

  • Join Filter: (nc.env_id = depto2.env_id)
3. 1.568 460.234 ↓ 57.0 228 1

Nested Loop Left Join (cost=11.17..420.49 rows=4 width=168) (actual time=74.482..460.234 rows=228 loops=1)

4. 1.491 245.030 ↓ 57.0 228 1

Nested Loop Left Join (cost=10.74..386.63 rows=4 width=157) (actual time=74.432..245.030 rows=228 loops=1)

5. 1.269 223.945 ↓ 194.0 194 1

Nested Loop Left Join (cost=10.32..378.18 rows=1 width=161) (actual time=74.414..223.945 rows=194 loops=1)

6. 2.370 210.842 ↓ 194.0 194 1

Nested Loop Left Join (cost=9.90..370.05 rows=1 width=151) (actual time=64.418..210.842 rows=194 loops=1)

7. 1.874 208.278 ↓ 194.0 194 1

Nested Loop Left Join (cost=9.47..361.93 rows=1 width=145) (actual time=64.411..208.278 rows=194 loops=1)

8. 1.392 204.076 ↓ 194.0 194 1

Nested Loop (cost=9.05..353.81 rows=1 width=129) (actual time=64.339..204.076 rows=194 loops=1)

9. 6.086 54.382 ↓ 214.0 214 1

Nested Loop (cost=8.77..348.96 rows=1 width=120) (actual time=43.890..54.382 rows=214 loops=1)

10. 7.210 19.784 ↓ 254.6 1,782 1

Hash Join (cost=8.35..291.43 rows=7 width=85) (actual time=3.393..19.784 rows=1,782 loops=1)

  • Hash Cond: (nc.ent_sta_id = es.ent_sta_id_auto)
11. 9.311 10.687 ↓ 21.5 1,782 1

Bitmap Heap Scan on bus_ent_instance nc (cost=5.69..288.38 rows=83 width=69) (actual time=1.479..10.687 rows=1,782 loops=1)

  • Recheck Cond: ((bus_ent_id = 1006) AND (att_value_num_5 = '1'::numeric) AND (reg_status = 0) AND (env_id = 1001))
  • Heap Blocks: exact=632
12. 1.376 1.376 ↓ 24.9 2,067 1

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

  • Index Cond: ((bus_ent_id = 1006) AND (att_value_num_5 = '1'::numeric) AND (reg_status = 0) AND (env_id = 1001))
13. 0.194 1.887 ↑ 1.0 74 1

Hash (cost=1.74..1.74 rows=74 width=24) (actual time=1.887..1.887 rows=74 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
14. 1.693 1.693 ↑ 1.0 74 1

Seq Scan on bus_ent_status es (cost=0.00..1.74 rows=74 width=24) (actual time=0.021..1.693 rows=74 loops=1)

15. 28.512 28.512 ↓ 0.0 0 1,782

Index Scan using ix_bus_ent_instance_attn_01 on bus_ent_instance audi (cost=0.42..8.21 rows=1 width=40) (actual time=0.015..0.016 rows=0 loops=1,782)

  • Index Cond: ((bus_ent_id = 1233) AND (att_value_num_1 = (nc.bus_ent_inst_name_num)::numeric) AND (reg_status = 0) AND (env_id = 1001))
  • Filter: (bus_ent_inst_create_data > '2019-01-18 00:00:00'::timestamp without time zone)
  • Rows Removed by Filter: 0
16. 148.302 148.302 ↑ 1.0 1 214

Index Only Scan using ix_bus_ent_inst_attribute_rep_formali_4436 on bus_ent_inst_attribute audi_att (cost=0.27..4.84 rows=1 width=13) (actual time=0.690..0.693 rows=1 loops=214)

  • Index Cond: ((bus_ent_inst_id = audi.bus_ent_inst_id_auto) AND (att_id = 4436) AND (env_id = 1001))
  • Heap Fetches: 194
17. 2.328 2.328 ↑ 1.0 1 194

Index Scan using uc_entity_inst_num on bus_ent_instance delito (cost=0.42..8.11 rows=1 width=28) (actual time=0.010..0.012 rows=1 loops=194)

  • Index Cond: ((nc.env_id = env_id) AND (env_id = 1001) AND (bus_ent_id = 1296) AND ((nc.att_value_6)::integer = bus_ent_inst_name_num))
18. 0.194 0.194 ↓ 0.0 0 194

Index Scan using uc_entity_inst_num on bus_ent_instance acci (cost=0.42..8.11 rows=1 width=21) (actual time=0.001..0.001 rows=0 loops=194)

  • Index Cond: ((nc.env_id = env_id) AND (env_id = 1001) AND (bus_ent_id = 1073) AND ((nc.att_value_7)::integer = bus_ent_inst_name_num))
19. 11.834 11.834 ↑ 1.0 1 194

Index Scan using uc_entity_inst_num on bus_ent_instance fisc (cost=0.42..8.11 rows=1 width=20) (actual time=0.059..0.061 rows=1 loops=194)

  • Index Cond: ((nc.env_id = env_id) AND (env_id = 1001) AND (bus_ent_id = 1019) AND ((nc.att_value_9)::integer = bus_ent_inst_name_num))
20. 19.594 19.594 ↑ 1.0 1 194

Index Scan using ix_bus_ent_instance_atts_01 on bus_ent_instance sol (cost=0.42..8.45 rows=1 width=12) (actual time=0.100..0.101 rows=1 loops=194)

  • Index Cond: ((bus_ent_id = 1327) AND ((att_value_1)::text = (audi.att_value_1)::text) AND (reg_status = 0) AND (env_id = 1001))
21. 213.636 213.636 ↑ 1.0 1 228

Index Scan using ix_bus_ent_inst_attr_01 on bus_ent_inst_attribute att_dir_hecho (cost=0.43..8.46 rows=1 width=19) (actual time=0.935..0.937 rows=1 loops=228)

  • Index Cond: ((nc.bus_ent_inst_id_auto = bus_ent_inst_id) AND (att_id = 2224) AND (nc.env_id = env_id) AND (env_id = 1001))
22. 13.680 13.680 ↑ 1.0 1 228

Index Scan using uc_entity_inst_num on bus_ent_instance depto2 (cost=0.42..6.00 rows=1 width=16) (actual time=0.058..0.060 rows=1 loops=228)

  • Index Cond: ((env_id = 1001) AND (bus_ent_id = 1091) AND ((att_dir_hecho.ent_inst_att_str_value)::integer = bus_ent_inst_name_num))
23.          

SubPlan (forNested Loop Left Join)

24. 3.192 3.192 ↑ 1.0 1 228

Seq Scan on bus_ent_status est (cost=0.00..1.93 rows=1 width=20) (actual time=0.012..0.014 rows=1 loops=228)

  • Filter: (ent_sta_id_auto = audi.ent_sta_id)
  • Rows Removed by Filter: 73
25. 1.368 1.368 ↑ 1.0 1 228

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.004..0.006 rows=1 loops=228)

Planning time : 56.123 ms
Execution time : 493.470 ms