ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 99

99

原创 Linux操作系统 作者:simkyo 时间:2013-08-29 13:44:27 0 删除 编辑

--查看表空间使用率
select used_percent from dba_tablespace_usage_metrics
where tablespace_name = 'system';

declare
  type t_cur_test_n is table of varchar2(20);
  t_tab t_cur_test_n := t_cur_test_n(null);
  t1    number;
  t2    number;
  t3    number;
  procedure get_time(t out number) is
  begin
    select to_char(sysdate, 'sssss') into t from dual;
  end;
  procedure p_1(tab in out t_cur_test_n) is
  begin
    null;
  end;
  procedure p_2(tab in out nocopy t_cur_test_n) is
  begin
    null;
  end;
begin
  select t.tname into t_tab(1) from t_cur_test t where tid = 6;
    get_time(t1);
  dbms_output.put_line( to_char(t1 ));
 
  t_tab.extend(8000000,1);
  p_1(t_tab);
  get_time(t2);
  dbms_output.put_line( to_char(t2 ));
 
  t_tab.extend(8000000,1);
  p_2(t_tab);
  get_time(t3); 
  dbms_output.put_line( to_char(t3 )); 
 
  dbms_output.put_line('时间为');
  dbms_output.put_line('---------------');
  dbms_output.put_line('不带NOCOPY: ' || to_char(t2 - t1));
  dbms_output.put_line('带NOCOPY: ' || to_char(t3 - t2));
end;

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12961536/viewspace-769577/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 98
下一篇: 100
请登录后发表评论 登录
全部评论

注册时间:2013-06-20

  • 博文量
    193
  • 访问量
    165518