Get execution time of sql script in oracle sqlplus

后端 未结 5 1103
既然无缘
既然无缘 2021-02-13 11:38

I have a script that i use to load my data into my tables in Oracle (by a list of insert statements). How can i get the execution time of the entire loading process? I have trie

5条回答
  •  太阳男子
    2021-02-13 12:25

    Try this, add the following at the beginning and it remembers the current time:

    set serveroutput on
    variable n number
    exec :n := dbms_utility.get_time
    

    Add this at the end and it calculates the time elapsed:

    exec :n := (dbms_utility.get_time - :n)/100
    exec dbms_output.put_line(:n)
    

提交回复
热议问题