WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
WHENEVER OSERROR  EXIT FAILURE ROLLBACK;

spool sys_runtime_req_top_timeuse.log

prompt
prompt Creating table sys_runtime_req_top_use
prompt ====================================
prompt

-------------------保存最耗时的操作
whenever sqlerror continue
drop table sys_runtime_req_top_timeuse;
whenever sqlerror exit failure rollback


create table sys_runtime_req_top_timeuse
(
       id             number,
       day            date not null,
       url            varchar2(200) not null,
       med_duration   number not null,--平均访问时间
       max_duration   number not null,
       min_duranion   number not null,
       avg_duration   number not null
);
create index req_top_timeuse_idx1 on sys_runtime_req_top_timeuse(day);
alter table  sys_runtime_req_top_timeuse add primary key (id);

spool off
exit