How can I find out the query execution time in Oracle SQL using Toad?

Viewed 3358

I am building an application that has a couple hundred select`s and I need to print in a report the query time.

I am using Oracle databases with Toad IDE.

Let`s say for example I have a "select * from names" and I would like to print the query execution time.

Thanks

I created a function in Java because I am generating the report with Java but it prints the execution that it calculates from Java not the exact database query execution time

I would like to print the query execution time

1 Answers

A simple option is to view "Query viewer" tab; it shows execution time for each statement you run.

If it is a script you run within TOAD, then you'll have to calculate it yourself by subtracting date before the statement from date after that statement. Those DATE values should be set to SYSDATE. Result is number of days so you'll have to recalculate it to display something smarter (hours, minutes, seconds).

Related