explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1aRW

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 14,365,406.999 ↓ 239.3 455,428 1

Sort (cost=1,714,360,914.81..1,714,360,919.57 rows=1,903 width=8,484) (actual time=14,364,785.888..14,365,406.999 rows=455,428 loops=1)

  • Sort Key: noticia_criminal.fecha_hecho
  • Sort Method: external merge Disk: 84240kB
2.          

CTE noticia_criminal

3. 7,474.736 12,964,911.998 ↓ 239.3 455,428 1

HashAggregate (cost=856,575,543.74..1,712,780,266.71 rows=1,903 width=143) (actual time=12,964,063.366..12,964,911.998 rows=455,428 loops=1)

  • Group Key: ei.att_value_5, depto.att_value_1, delito.att_value_2, hepo.att_value_1, acci.att_value_1, fisc.att_value_1, ei.att_value_num_2, ei.att_value_8, es.ent_sta_desc, CASE WHEN (ei.att_value_num_8 = '1'::numeric) THEN 'SI'::text ELSE 'NO':: (...)
4. 39,835.358 12,957,437.262 ↓ 239.4 455,495 1

Nested Loop Left Join (cost=195,150.46..856,575,429.56 rows=1,903 width=143) (actual time=52,094.812..12,957,437.262 rows=455,495 loops=1)

5. 3,188.356 4,696,372.649 ↓ 239.4 455,495 1

Nested Loop Left Join (cost=195,149.89..354,675.78 rows=1,903 width=159) (actual time=52,030.373..4,696,372.649 rows=455,495 loops=1)

6. 2,373.798 734,932.743 ↓ 239.4 455,495 1

Nested Loop Left Join (cost=195,149.46..288,525.05 rows=1,903 width=144) (actual time=52,024.165..734,932.743 rows=455,495 loops=1)

7. 2,357.547 731,647.955 ↓ 239.4 455,495 1

Nested Loop Left Join (cost=195,148.89..272,475.21 rows=1,903 width=147) (actual time=52,024.133..731,647.955 rows=455,495 loops=1)

8. 2,405.194 727,923.923 ↓ 239.4 455,495 1

Nested Loop Left Join (cost=195,148.32..256,425.38 rows=1,903 width=159) (actual time=52,024.098..727,923.923 rows=455,495 loops=1)

9. 3,189.322 403,939.259 ↓ 239.4 455,495 1

Nested Loop Left Join (cost=195,147.89..237,221.67 rows=1,903 width=144) (actual time=52,003.193..403,939.259 rows=455,495 loops=1)

10. 2,944.670 393,917.512 ↓ 239.4 455,495 1

Nested Loop Left Join (cost=195,147.32..221,171.83 rows=1,903 width=137) (actual time=52,003.138..393,917.512 rows=455,495 loops=1)

11. 2,894.793 386,417.892 ↓ 239.4 455,495 1

Nested Loop Left Join (cost=195,146.75..205,121.99 rows=1,903 width=134) (actual time=52,003.117..386,417.892 rows=455,495 loops=1)

12. 4,088.384 59,256.939 ↓ 239.3 455,430 1

Merge Left Join (cost=195,146.33..195,434.45 rows=1,903 width=119) (actual time=52,003.055..59,256.939 rows=455,430 loops=1)

  • Merge Cond: ((ei.env_id = depto.env_id) AND (secc.att_value_num_2 = ((depto.bus_ent_inst_name_num)::numeric)))
13. 3,901.286 54,276.110 ↓ 239.3 455,430 1

Sort (cost=103,600.64..103,605.40 rows=1,903 width=122) (actual time=51,991.769..54,276.110 rows=455,430 loops=1)

  • Sort Key: ei.env_id, secc.att_value_num_2
  • Sort Method: quicksort Memory: 100832kB
14. 1,633.452 50,374.824 ↓ 239.3 455,430 1

Nested Loop Left Join (cost=1,745.03..103,496.99 rows=1,903 width=122) (actual time=42,483.698..50,374.824 rows=455,430 loops=1)

15. 1,000.143 46,008.792 ↓ 239.3 455,430 1

Hash Join (cost=1,744.46..87,447.15 rows=1,903 width=119) (actual time=42,483.583..46,008.792 rows=455,430 loops=1)

  • Hash Cond: ((ei.env_id = es.env_id) AND (ei.ent_sta_id = es.ent_sta_id_auto))
16. 2,664.570 45,008.490 ↓ 18.2 455,430 1

Bitmap Heap Scan on bus_ent_instance ei (cost=1,740.64..87,236.85 rows=24,992 width=85) (actual time=42,483.390..45,008.490 rows=455,430 loops=1)

  • Recheck Cond: (((bus_ent_inst_name_pre)::text = 'NC'::text) AND (att_value_num_5 = '1'::numeric) AND (reg_status = 0))
  • Filter: (bus_ent_inst_create_data < ('now'::cstring)::date)
  • Rows Removed by Filter: 4
  • Heap Blocks: exact=287863
17. 42,343.920 42,343.920 ↓ 18.3 456,237 1

Bitmap Index Scan on ix_bus_ent_instance_attn_namenum_05 (cost=0.00..1,734.39 rows=24,994 width=0) (actual time=42,343.920..42,343.920 rows=456,237 loops=1)

  • Index Cond: (((bus_ent_inst_name_pre)::text = 'NC'::text) AND (att_value_num_5 = '1'::numeric) AND (reg_status = 0))
18. 0.073 0.159 ↑ 1.0 73 1

Hash (cost=2.73..2.73 rows=73 width=46) (actual time=0.159..0.159 rows=73 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
19. 0.086 0.086 ↑ 1.0 73 1

Seq Scan on bus_ent_status es (cost=0.00..2.73 rows=73 width=46) (actual time=0.020..0.086 rows=73 loops=1)

20. 2,732.580 2,732.580 ↑ 1.0 1 455,430

Index Scan using uc_entity_inst_num on bus_ent_instance secc (cost=0.57..8.42 rows=1 width=14) (actual time=0.005..0.006 rows=1 loops=455,430)

  • Index Cond: ((ei.env_id = env_id) AND (bus_ent_id = 1112) AND ((ei.att_value_3)::integer = bus_ent_inst_name_num))
21. 881.261 892.445 ↓ 16.9 443,290 1

Sort (cost=91,545.68..91,611.17 rows=26,194 width=11) (actual time=11.266..892.445 rows=443,290 loops=1)

  • Sort Key: depto.env_id, ((depto.bus_ent_inst_name_num)::numeric)
  • Sort Method: quicksort Memory: 26kB
22. 0.072 11.184 ↑ 1,309.7 20 1

Bitmap Heap Scan on bus_ent_instance depto (cost=747.57..89,623.44 rows=26,194 width=11) (actual time=11.147..11.184 rows=20 loops=1)

  • Recheck Cond: (bus_ent_id = 1091)
  • Heap Blocks: exact=4
23. 11.112 11.112 ↑ 1,309.7 20 1

Bitmap Index Scan on ix_bus_ent_instance_mejora (cost=0.00..741.02 rows=26,194 width=0) (actual time=11.112..11.112 rows=20 loops=1)

  • Index Cond: (bus_ent_id = 1091)
24. 324,266.160 324,266.160 ↓ 0.0 0 455,430

Index Only Scan using ix_bus_ent_inst_attribute_nc_trabajada on bus_ent_inst_attribute att_cc (cost=0.42..5.07 rows=2 width=23) (actual time=0.711..0.712 rows=0 loops=455,430)

  • Index Cond: ((bus_ent_inst_id = ei.bus_ent_inst_id_auto) AND (att_id = 4016) AND (env_id = ei.env_id))
  • Heap Fetches: 43230
25. 4,554.950 4,554.950 ↓ 0.0 0 455,495

Index Scan using uc_entity_inst_num on bus_ent_instance fisc (cost=0.57..8.42 rows=1 width=11) (actual time=0.009..0.010 rows=0 loops=455,495)

  • Index Cond: ((ei.env_id = env_id) AND (bus_ent_id = 1019) AND ((ei.att_value_9)::integer = bus_ent_inst_name_num))
26. 6,832.425 6,832.425 ↑ 1.0 1 455,495

Index Scan using uc_entity_inst_num on bus_ent_instance delito (cost=0.57..8.42 rows=1 width=19) (actual time=0.013..0.015 rows=1 loops=455,495)

  • Index Cond: ((ei.env_id = env_id) AND (bus_ent_id = 1296) AND ((ei.att_value_6)::integer = bus_ent_inst_name_num))
27. 321,579.470 321,579.470 ↓ 0.0 0 455,495

Index Scan using ix_reporte_nc_por_estados_01 on bus_ent_inst_attribute att_hepo (cost=0.43..10.07 rows=2 width=23) (actual time=0.706..0.706 rows=0 loops=455,495)

  • Index Cond: ((ei.env_id = env_id) AND (ei.bus_ent_inst_id_auto = bus_ent_inst_id) AND (att_id = 1385))
28. 1,366.485 1,366.485 ↓ 0.0 0 455,495

Index Scan using uc_entity_inst_num on bus_ent_instance hepo (cost=0.57..8.42 rows=1 width=11) (actual time=0.003..0.003 rows=0 loops=455,495)

  • Index Cond: ((ei.env_id = env_id) AND (bus_ent_id = 1099) AND ((att_hepo.ent_inst_att_str_value)::integer = bus_ent_inst_name_num))
29. 910.990 910.990 ↓ 0.0 0 455,495

Index Scan using uc_entity_inst_num on bus_ent_instance acci (cost=0.57..8.42 rows=1 width=11) (actual time=0.002..0.002 rows=0 loops=455,495)

  • Index Cond: ((ei.env_id = env_id) AND (bus_ent_id = 1073) AND ((ei.att_value_7)::integer = bus_ent_inst_name_num))
30. 3,958,251.550 3,958,251.550 ↑ 16.0 1 455,495

Index Scan using ix_reporte_nc_por_estados_01 on bus_ent_inst_attribute att_dir_hecho (cost=0.43..34.60 rows=16 width=23) (actual time=8.688..8.690 rows=1 loops=455,495)

  • Index Cond: ((ei.env_id = env_id) AND (ei.bus_ent_inst_id_auto = bus_ent_inst_id) AND (att_id = 2224))
31. 10,476.385 10,476.385 ↑ 1.0 1 455,495

Index Scan using uc_entity_inst_num on bus_ent_instance depto2 (cost=0.57..8.42 rows=1 width=11) (actual time=0.021..0.023 rows=1 loops=455,495)

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

SubPlan (forNested Loop Left Join)

33. 7,295.210 4,714,373.250 ↑ 1.0 1 455,495

Nested Loop (cost=1.43..71.40 rows=1 width=3) (actual time=10.311..10.350 rows=1 loops=455,495)

34. 3,643.960 4,693,420.480 ↑ 4.0 1 455,495

Nested Loop (cost=0.86..37.31 rows=4 width=15) (actual time=10.269..10.304 rows=1 loops=455,495)

35. 9,109.900 9,109.900 ↑ 1.0 1 455,495

Index Scan using ix_attribute_03 on attribute att (cost=0.28..8.30 rows=1 width=4) (actual time=0.018..0.020 rows=1 loops=455,495)

  • Index Cond: ((att_name)::text = 'DIRECCION_JURISDICCION_STR'::text)
36. 4,680,666.620 4,680,666.620 ↑ 12.0 1 455,495

Index Scan using ix_bus_ent_inst_attr_01 on bus_ent_inst_attribute beia (cost=0.58..28.89 rows=12 width=19) (actual time=10.245..10.276 rows=1 loops=455,495)

  • Index Cond: ((ei.bus_ent_inst_id_auto = bus_ent_inst_id) AND (att_id = att.att_id_auto))
37. 13,657.560 13,657.560 ↑ 1.0 1 455,252

Index Scan using ix_bus_ent_instance_02 on bus_ent_instance juri (cost=0.57..8.51 rows=1 width=7) (actual time=0.029..0.030 rows=1 loops=455,252)

  • Index Cond: (((bus_ent_inst_name_pre)::text = 'JUR'::text) AND (bus_ent_inst_name_num = (beia.ent_inst_att_str_value)::integer))
38. 8,489.674 1,344,165.745 ↓ 0.0 0 455,495

Hash Join (cost=784.93..89,988.27 rows=4 width=3) (actual time=2.949..2.951 rows=0 loops=455,495)

  • Hash Cond: ((sug.bus_ent_inst_name_num)::numeric = beia_1.ent_inst_att_num_value)
39. 1,117.732 3,353.196 ↑ 8,731.3 3 101,612

Bitmap Heap Scan on bus_ent_instance sug (cost=747.57..89,623.44 rows=26,194 width=7) (actual time=0.030..0.033 rows=3 loops=101,612)

  • Recheck Cond: (bus_ent_id = 1300)
  • Heap Blocks: exact=101612
40. 2,235.464 2,235.464 ↑ 8,731.3 3 101,612

Bitmap Index Scan on ix_bus_ent_instance_mejora (cost=0.00..741.02 rows=26,194 width=0) (actual time=0.022..0.022 rows=3 loops=101,612)

  • Index Cond: (bus_ent_id = 1300)
41. 1,821.980 1,332,322.875 ↓ 0.0 0 455,495

Hash (cost=37.31..37.31 rows=4 width=5) (actual time=2.925..2.925 rows=0 loops=455,495)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
42. 3,188.465 1,330,500.895 ↓ 0.0 0 455,495

Nested Loop (cost=0.86..37.31 rows=4 width=5) (actual time=2.917..2.921 rows=0 loops=455,495)

43. 9,565.395 9,565.395 ↑ 1.0 1 455,495

Index Scan using ix_attribute_03 on attribute att_1 (cost=0.28..8.30 rows=1 width=4) (actual time=0.020..0.021 rows=1 loops=455,495)

  • Index Cond: ((att_name)::text = 'NC_DPA_SUGERENCIA_DEPURACION_NUM'::text)
44. 1,317,747.035 1,317,747.035 ↓ 0.0 0 455,495

Index Scan using ix_bus_ent_inst_attr_01 on bus_ent_inst_attribute beia_1 (cost=0.58..28.89 rows=12 width=9) (actual time=2.891..2.893 rows=0 loops=455,495)

  • Index Cond: ((ei.bus_ent_inst_id_auto = bus_ent_inst_id) AND (att_id = att_1.att_id_auto))
45. 3,900.373 25,052.225 ↓ 0.0 0 455,495

Hash Join (cost=784.93..89,988.27 rows=4 width=3) (actual time=0.055..0.055 rows=0 loops=455,495)

  • Hash Cond: ((via.bus_ent_inst_name_num)::numeric = beia_2.ent_inst_att_num_value)
46. 102.752 199.082 ↑ 6,548.5 4 6,422

Bitmap Heap Scan on bus_ent_instance via (cost=747.57..89,623.44 rows=26,194 width=7) (actual time=0.024..0.031 rows=4 loops=6,422)

  • Recheck Cond: (bus_ent_id = 1301)
  • Heap Blocks: exact=12844
47. 96.330 96.330 ↑ 6,548.5 4 6,422

Bitmap Index Scan on ix_bus_ent_instance_mejora (cost=0.00..741.02 rows=26,194 width=0) (actual time=0.015..0.015 rows=4 loops=6,422)

  • Index Cond: (bus_ent_id = 1301)
48. 1,821.980 20,952.770 ↓ 0.0 0 455,495

Hash (cost=37.31..37.31 rows=4 width=5) (actual time=0.046..0.046 rows=0 loops=455,495)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
49. 1,821.980 19,130.790 ↓ 0.0 0 455,495

Nested Loop (cost=0.86..37.31 rows=4 width=5) (actual time=0.042..0.042 rows=0 loops=455,495)

50. 7,287.920 7,287.920 ↑ 1.0 1 455,495

Index Scan using ix_attribute_03 on attribute att_2 (cost=0.28..8.30 rows=1 width=4) (actual time=0.015..0.016 rows=1 loops=455,495)

  • Index Cond: ((att_name)::text = 'NC_DPA_APLICAR_VIAS_ALTERNATIVAS_NUM'::text)
51. 10,020.890 10,020.890 ↓ 0.0 0 455,495

Index Scan using ix_bus_ent_inst_attr_01 on bus_ent_inst_attribute beia_2 (cost=0.58..28.89 rows=12 width=9) (actual time=0.021..0.022 rows=0 loops=455,495)

  • Index Cond: ((ei.bus_ent_inst_id_auto = bus_ent_inst_id) AND (att_id = att_2.att_id_auto))
52. 4,774.044 1,559,614.880 ↓ 0.0 0 455,495

Hash Join (cost=784.93..89,988.27 rows=4 width=3) (actual time=3.422..3.424 rows=0 loops=455,495)

  • Hash Cond: ((gra.bus_ent_inst_name_num)::numeric = beia_3.ent_inst_att_num_value)
53. 1,548.520 4,335.856 ↑ 8,731.3 3 154,852

Bitmap Heap Scan on bus_ent_instance gra (cost=747.57..89,623.44 rows=26,194 width=7) (actual time=0.025..0.028 rows=3 loops=154,852)

  • Recheck Cond: (bus_ent_id = 1008)
  • Heap Blocks: exact=154852
54. 2,787.336 2,787.336 ↑ 8,731.3 3 154,852

Bitmap Index Scan on ix_bus_ent_instance_mejora (cost=0.00..741.02 rows=26,194 width=0) (actual time=0.018..0.018 rows=3 loops=154,852)

  • Index Cond: (bus_ent_id = 1008)
55. 2,277.475 1,550,504.980 ↓ 0.0 0 455,495

Hash (cost=37.31..37.31 rows=4 width=5) (actual time=3.404..3.404 rows=0 loops=455,495)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
56. 2,732.970 1,548,227.505 ↓ 0.0 0 455,495

Nested Loop (cost=0.86..37.31 rows=4 width=5) (actual time=3.397..3.399 rows=0 loops=455,495)

57. 6,832.425 6,832.425 ↑ 1.0 1 455,495

Index Scan using ix_attribute_03 on attribute att_3 (cost=0.28..8.30 rows=1 width=4) (actual time=0.014..0.015 rows=1 loops=455,495)

  • Index Cond: ((att_name)::text = 'NC_GRAVEDAD_DEL_HECHO_NUM'::text)
58. 1,538,662.110 1,538,662.110 ↓ 0.0 0 455,495

Index Scan using ix_bus_ent_inst_attr_01 on bus_ent_inst_attribute beia_3 (cost=0.58..28.89 rows=12 width=9) (actual time=3.377..3.378 rows=0 loops=455,495)

  • Index Cond: ((ei.bus_ent_inst_id_auto = bus_ent_inst_id) AND (att_id = att_3.att_id_auto))
59. 5,465.940 70,601.725 ↑ 1.0 1 455,495

Aggregate (cost=89,988.28..89,988.29 rows=1 width=3) (actual time=0.154..0.155 rows=1 loops=455,495)

60. 5,101.510 65,135.785 ↓ 0.0 0 455,495

Hash Join (cost=784.93..89,988.27 rows=4 width=3) (actual time=0.142..0.143 rows=0 loops=455,495)

  • Hash Cond: ((prio.bus_ent_inst_name_num)::numeric = beia_4.ent_inst_att_num_value)
61. 929.220 3,097.400 ↑ 8,731.3 3 154,870

Bitmap Heap Scan on bus_ent_instance prio (cost=747.57..89,623.44 rows=26,194 width=7) (actual time=0.018..0.020 rows=3 loops=154,870)

  • Recheck Cond: (bus_ent_id = 1034)
  • Heap Blocks: exact=154870
62. 2,168.180 2,168.180 ↑ 8,731.3 3 154,870

Bitmap Index Scan on ix_bus_ent_instance_mejora (cost=0.00..741.02 rows=26,194 width=0) (actual time=0.014..0.014 rows=3 loops=154,870)

  • Index Cond: (bus_ent_id = 1034)
63. 1,821.980 56,936.875 ↓ 0.0 0 455,495

Hash (cost=37.31..37.31 rows=4 width=5) (actual time=0.125..0.125 rows=0 loops=455,495)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
64. 2,732.970 55,114.895 ↓ 0.0 0 455,495

Nested Loop (cost=0.86..37.31 rows=4 width=5) (actual time=0.119..0.121 rows=0 loops=455,495)

65. 8,198.910 8,198.910 ↑ 1.0 1 455,495

Index Scan using ix_attribute_03 on attribute att_4 (cost=0.28..8.30 rows=1 width=4) (actual time=0.017..0.018 rows=1 loops=455,495)

  • Index Cond: ((att_name)::text = 'NC_PRIORIDAD_PRIORIDAD_SUGERIDA_ENUM'::text)
66. 44,183.015 44,183.015 ↓ 0.0 0 455,495

Index Scan using ix_bus_ent_inst_attr_01 on bus_ent_inst_attribute beia_4 (cost=0.58..28.89 rows=12 width=9) (actual time=0.097..0.097 rows=0 loops=455,495)

  • Index Cond: ((ei.bus_ent_inst_id_auto = bus_ent_inst_id) AND (att_id = att_4.att_id_auto))
67. 3,991.131 313,380.560 ↓ 0.0 0 455,495

Hash Join (cost=784.93..89,824.52 rows=1 width=3) (actual time=0.688..0.688 rows=0 loops=455,495)

  • Hash Cond: (art.bus_ent_inst_name_num = (beia_5.ent_inst_att_str_value)::integer)
68. 354.544 1,019.314 ↑ 13,097.0 2 44,318

Bitmap Heap Scan on bus_ent_instance art (cost=747.57..89,623.44 rows=26,194 width=7) (actual time=0.021..0.023 rows=2 loops=44,318)

  • Recheck Cond: (bus_ent_id = 1009)
  • Heap Blocks: exact=44318
69. 664.770 664.770 ↑ 13,097.0 2 44,318

Bitmap Index Scan on ix_bus_ent_instance_mejora (cost=0.00..741.02 rows=26,194 width=0) (actual time=0.015..0.015 rows=2 loops=44,318)

  • Index Cond: (bus_ent_id = 1009)
70. 1,821.980 308,370.115 ↓ 0.0 0 455,495

Hash (cost=37.31..37.31 rows=4 width=15) (actual time=0.677..0.677 rows=0 loops=455,495)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
71. 2,277.475 306,548.135 ↓ 0.0 0 455,495

Nested Loop (cost=0.86..37.31 rows=4 width=15) (actual time=0.672..0.673 rows=0 loops=455,495)

72. 7,287.920 7,287.920 ↑ 1.0 1 455,495

Index Scan using ix_attribute_03 on attribute att_5 (cost=0.28..8.30 rows=1 width=4) (actual time=0.015..0.016 rows=1 loops=455,495)

  • Index Cond: ((att_name)::text = 'NC_ART_PRE_ARCHIVO_STR'::text)
73. 296,982.740 296,982.740 ↓ 0.0 0 455,495

Index Scan using ix_bus_ent_inst_attr_01 on bus_ent_inst_attribute beia_5 (cost=0.58..28.89 rows=12 width=19) (actual time=0.652..0.652 rows=0 loops=455,495)

  • Index Cond: ((ei.bus_ent_inst_id_auto = bus_ent_inst_id) AND (att_id = att_5.att_id_auto))
74. 2,277.475 173,999.090 ↓ 0.0 0 455,495

Nested Loop (cost=0.86..37.31 rows=4 width=15) (actual time=0.382..0.382 rows=0 loops=455,495)

75. 6,376.930 6,376.930 ↑ 1.0 1 455,495

Index Scan using ix_attribute_03 on attribute att_6 (cost=0.28..8.30 rows=1 width=4) (actual time=0.013..0.014 rows=1 loops=455,495)

  • Index Cond: ((att_name)::text = 'CASO_ELIMINADO_ID_NUEVO'::text)
76. 165,344.685 165,344.685 ↓ 0.0 0 455,495

Index Scan using ix_bus_ent_inst_attr_01 on bus_ent_inst_attribute beia_6 (cost=0.58..28.89 rows=12 width=19) (actual time=0.363..0.363 rows=0 loops=455,495)

  • Index Cond: ((ei.bus_ent_inst_id_auto = bus_ent_inst_id) AND (att_id = att_6.att_id_auto))
77. 2,277.475 9,565.395 ↓ 0.0 0 455,495

Nested Loop (cost=0.86..37.31 rows=4 width=15) (actual time=0.021..0.021 rows=0 loops=455,495)

78. 5,010.445 5,010.445 ↑ 1.0 1 455,495

Index Scan using ix_attribute_03 on attribute att_7 (cost=0.28..8.30 rows=1 width=4) (actual time=0.010..0.011 rows=1 loops=455,495)

  • Index Cond: ((att_name)::text = 'CASO_ELIMINADO_ID_NUEVO'::text)
79. 2,277.475 2,277.475 ↓ 0.0 0 455,495

Index Scan using ix_bus_ent_inst_attr_01 on bus_ent_inst_attribute beia_7 (cost=0.58..28.89 rows=12 width=19) (actual time=0.005..0.005 rows=0 loops=455,495)

  • Index Cond: ((ei.bus_ent_inst_id_auto = bus_ent_inst_id) AND (att_id = att_7.att_id_auto))
80.          

CTE bus_instance_log_reducida

81. 1,372,985.865 1,376,337.620 ↓ 8.8 4,737,670 1

Bitmap Heap Scan on bus_ent_instance_log beil (cost=14,163.41..1,568,323.30 rows=541,169 width=12) (actual time=3,793.569..1,376,337.620 rows=4,737,670 loops=1)

  • Recheck Cond: ((bus_ent_id = 1006) AND (reg_status = 0) AND (ent_sta_id = ANY ('{1005,1010}'::integer[])))
  • Rows Removed by Index Recheck: 32852372
  • Filter: (env_id = 1001)
  • Heap Blocks: exact=675318 lossy=673825
82. 3,351.755 3,351.755 ↓ 8.8 4,737,733 1

Bitmap Index Scan on ix_bus_ent_instance_log_reporte_nc_por_estados (cost=0.00..14,028.12 rows=541,169 width=0) (actual time=3,351.755..3,351.755 rows=4,737,733 loops=1)

  • Index Cond: ((bus_ent_id = 1006) AND (reg_status = 0))
83.          

Initplan (forSort)

84. 4,179.885 1,391,922.752 ↑ 1.0 1 1

Aggregate (cost=12,183.07..12,183.08 rows=1 width=8) (actual time=1,391,922.750..1,391,922.752 rows=1 loops=1)

85. 1,387,742.867 1,387,742.867 ↓ 1,750.8 4,737,670 1

CTE Scan on bus_instance_log_reducida beilr (cost=0.00..12,176.30 rows=2,706 width=8) (actual time=3,793.590..1,387,742.867 rows=4,737,670 loops=1)

  • Filter: (bus_ent_inst_name_num = bus_ent_inst_name_num)
86. 14,358,308.605 14,358,308.605 ↓ 239.3 455,428 1

CTE Scan on noticia_criminal (cost=0.00..38.06 rows=1,903 width=8,484) (actual time=14,355,986.189..14,358,308.605 rows=455,428 loops=1)