Re: sql start time

From: Lothar Flatz <l.flatz_at_bluewin.ch>
Date: Sun, 11 Apr 2021 13:49:35 +0200
Message-ID: <534c8ca4-94bf-aadc-09a6-8d63aa58ae9a_at_bluewin.ch>



Hi Vinay ,

I do not think you can. I admit I wonder about the request. There might be times when the system is loaded, but a query is either efficient or it is not.
That has no relation to system load, which could of course make things worse...
As you are talking statspack you will not have the Diag& Tun option. Then,  for your purpose I guess OraSash can help: https://pioro.github.io/orasash/.
In Addition, runtime stats (Statistics_level=all) could be useful too.

Regards

Lothar

Am 10.04.2021 um 19:46 schrieb Vinay Kumar Narisetty:
> We have OLTP and OLAP applications running on the same production
> database. I see a lot of SQL queries poorly written are coming from BI
> system.I enabled statspack and sent the top 10 tuning sql's to BI
> team.They came back and requested me to provide starttime and endtime
> of sql queries.I enabled trace level 7 on statspack report. Is there a
> way I can get starttime and endtime within the statspack report ?
>
> Thanks,
> Vinay
>
> On Sat, Apr 10, 2021 at 10:14 AM Luis Claudio Dias dos Santos
> <lsantos_at_pobox.com <mailto:lsantos_at_pobox.com>> wrote:
>
> For a real long running query ASH (if available to you) can be used.
>
> Check *ashtop.sql* script from Tanel. In most of the cases I just
> use ashtop.sql to any type of ASH analysis.
>
>
>
> Em sáb., 10 de abr. de 2021 10:38, Karthikeyan Panchanathan
> <keyantech_at_gmail.com <mailto:keyantech_at_gmail.com>> escreveu:
>
> Check V$SQL which gives SQL first load time and last used time
>
> Also V$SQLAREA for other information
>
>
>
> Get Outlook for iOS <https://aka.ms/o0ukef>
> ------------------------------------------------------------------------
> *From:* oracle-l-bounce_at_freelists.org
> <mailto:oracle-l-bounce_at_freelists.org>
> <oracle-l-bounce_at_freelists.org
> <mailto:oracle-l-bounce_at_freelists.org>> on behalf of Vinay
> Kumar Narisetty <narisetty.vinay_at_gmail.com
> <mailto:narisetty.vinay_at_gmail.com>>
> *Sent:* Saturday, April 10, 2021 9:20:47 AM
> *To:* oracle-l <oracle-l_at_freelists.org
> <mailto:oracle-l_at_freelists.org>>
> *Subject:* sql start time
> Hi All,
>
> Is there way to get starttime and endtime of sql query ran in
> database using hashvalue or sqlid ?
>
> Thank,
> Vinay
>

--
http://www.freelists.org/webpage/oracle-l
Received on Sun Apr 11 2021 - 13:49:35 CEST

Original text of this message