oracle - 而不是更新触发器性能问题
问题描述
我在 oracle 上为我的应用程序开发了一个触发器,以将视图的所有更新定向到上表。
但是,这会导致性能问题。
这里是触发器
create or replace trigger trg_triggerview
instead of update
on view_based_on_table
begin
- ------------------------------------
if (: new.transfer_counter_column_view is not null) then
update table t
set transfer_counter_column_table =: new.transfer_counter_column_view
where t.id =: old.id;
end if;
-
end;
/
old trigger trg_triggerview ENABLE
;
transfer_counter_column_view 基于表的 transfer_counter_column_table 的视图。
表中的 id 与视图中的相同。
这就是为 id 过滤 where 子句的原因。
传输计数器在客户端每分钟更新多达 300 次
有人知道这个的高性能解决方案吗?
解决方案
推荐阅读
- html - 如何解决 thymeleaf css not found 错误?
- angular - 将多个数据发送到同一个数组
- java - 在模拟重力时修复用户碰撞
- python - 使用 excel 格式自定义 odoo 12 报告
- python - 记住scapy的最后一个IP,打印而不重复
- nix - 如何在 NixOS 中创建 systemd 服务模板?
- hover - Vala:无法让 enter_notify_event 正常工作
- python - 根据环比计算同比增长率
- sql - 基于嵌套 JSON 创建数据库
- node.js - 将 jsonp 集成到 Flask 服务器时返回 500 错误