You can spool it in a text file

解决方案 »

  1.   

    Or U can create a trigger and insert the sysdate into the auditing table
      

  2.   

    欢迎大家进来讨论,没有Good idea ,就帮我up一下
      

  3.   

    通过匿名块得到执行的平均时间,不知你为什么不能采用前后sysdate相减这种方法?declare
      statics_time1  date;
      statics_time2  date;
      l_count        number;  
    begin
      select sysdate into statics_time1 from dual;
      for i in 1..100 loop
        select count(*) into l_count from all_tables;
      end loop;
      select sysdate into statics_time2 from dual;
      
      -- insert (statics_time2 - statics_time1)/100 into your table.
    end;
    /
      

  4.   

    我知道在oem里也可以看到SQL语句的执行时间。
    但我想对随机产生的100次查询作统计诶。需要把SQL查询时间放入变量里,或数据库表中。
    是不是没有关于dbms追踪SQL语句执行时间的函数?
    一定要用两个sysdate相减吗?