- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这是我的代码的一部分。一切正常,没有错误。但我有数百万行要插入。我在互联网上搜索了更快完成工作的方法。
我发现,使用 nologgin 和 +append 在表中插入,但不起作用。即使我使用 nologging 和追加,在表中插入相同行的时间也是相同的。
create or replace procedure read_files(input varchar2, extensie varchar2) as
........................................
Loop
BEGIN
..............................
UTL_FILE.GET_line(F1,V1);
insert /*+ append */ into alarms(alarm_id,property_name,property_value)
=values(alarm_counter,f_property_name,f_property_value) ;
End loop;
end;
alter table alarms nologging;
execute read_files('occ','cap');
alter table alarms logging;
我的工作步骤:
我的错误在哪里?
最佳答案
APPEND 提示仅适用于 INSERT .. SELECT
语句。 APPEND_VALUES暗示 适用于 INSERT .. VALUES
语句。
直接路径插入有一些要求和限制。在尝试 APPEND_VALUES 提示之前,最好先尝试 FORALL。它增加了额外的步骤,但减少了 SQL 和 PL/SQL 之间的上下文切换,这可能会显着提高性能。
declare
type alarm_counter_nt is table of number;
type f_property_name_nt is table of varchar2(100);
type f_property_value_nt is table of varchar2(100);
alarm_counters alarm_counter_nt := alarm_counter_nt();
property_names f_property_name_nt := f_property_name_nt();
property_values f_property_value_nt := f_property_value_nt();
begin
--Get values.
loop
utl_file_get_line(f1, v1);
alarm_counters.extend;
alarm_counters(alarm_counters.count) := ?;
f_property_names.extend;
f_proprety_names(f_property_names.count) := ?;
f_property_values.extend;
f_property_values(f_property_values.count) := ?;
end loop;
--Insert values.
forall i in 1 .. alarm_counters.count
insert into alarms(alarm_id,property_name,property_value)
values(alarm_counters(i),f_property_names(i),f_property_values(i)) ;
commit;
end;
/
关于mysql - NOLOGGING 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31087446/
今天有小伙伴给我留言问到,try{...}catch(){...}是什么意思?它用来干什么? 简单的说 他们是用来捕获异常的 下面我们通过一个例子来详细讲解下
我正在努力提高网站的可访问性,但我不知道如何在页脚中标记社交媒体链接列表。这些链接指向我在 facecook、twitter 等上的帐户。我不想用 role="navigation" 标记这些链接,因
说现在是 6 点,我有一个 Timer 并在 10 点安排了一个 TimerTask。之后,System DateTime 被其他服务(例如 ntp)调整为 9 点钟。我仍然希望我的 TimerTas
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
我就废话不多说了,大家还是直接看代码吧~ ? 1
Maven系列1 1.什么是Maven? Maven是一个项目管理工具,它包含了一个对象模型。一组标准集合,一个依赖管理系统。和用来运行定义在生命周期阶段中插件目标和逻辑。 核心功能 Mav
我是一名优秀的程序员,十分优秀!