Q
Problem solve Get help with specific problems with your technologies, process and projects.

Determining timing of PL/SQL

I am trying to determine how to time my PL/SQL so I can run experiments and determine for myself if one way of doing things is faster than another. I can display sysdate before and after some processing, but I only see the second. Is there a way to see a more precise measurement, or is there a better way? Any help would be appreciated

Try setting both time and timing on in SQL*Plus by executing the following command:

set time on
set timing on

Now, you will get the timing when executing your PL/SQL.

There are other ways to determing where a query is better one way than the other. You can use EXPLAIN plan on your SQL to see how the ORACLE compile will physically fetch records that are result of your query.

You can also use tkprof to see physical I/O associated with your SQL statements.


Dig Deeper on Using Oracle PL-SQL

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close