| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Timing a query in sqlplus
On Feb 2, 9:41 am, "EscVector" <J..._at_webthere.com> wrote:
> On Feb 2, 7:41 am, "astalavista" <nob..._at_nowhere.com> wrote:
>
> > Hi,
>
> > In sqlplus, how to time a query ?
> > I set timing on
> > but the result seems to skewed by the display of the output lines (lot of
> > rows), no ?
> > How to get the correct timing for a query ?
>
> > Thanks in advance
>
> You could run it from a script with no output to screen or run create
> a refcursor and time the block execution.
Another way to get relative times between a set of queries is to encapsulte the original query and take a count... select count(1) from (<the original query>);
Because the same amount of data is returned (the count of the number of rows), timing difference is closely related to the query execution time. Please understand that this is only a "ball park" timing method for SQL tuning. Received on Fri Feb 02 2007 - 11:00:20 CST
![]() |
![]() |