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

spool sys_runtime_req_url_detail.log

prompt
prompt Creating table sys_runtime_req_url_detail
prompt ====================================
prompt

--------保存最耗时的操作的具体耗时明细
whenever sqlerror continue
drop table sys_runtime_req_url_detail;
whenever sqlerror exit failure rollback

create table sys_runtime_req_url_detail
(
       id             number,
       day            date            not null,
       urlid          number          not null,--来自表sys_runtime_req_top_timeuse,主键
       operation      varchar2(100)   not null,
       med_duration   number          not null,
       max_duration   number          not null,
       min_duration   number          not null,
       avg_duration   number          not null
);

create index req_url_detail_idx1 on sys_runtime_req_url_detail(urlid);
alter table sys_runtime_req_url_detail add primary key (id);


spool off
exit