Re: Oracle 11.2.0.3 timediff function

From: Andrew Kerber <andrew.kerber_at_gmail.com>
Date: Sun, 14 Feb 2016 12:31:05 -0600
Message-Id: <FB6C7C6A-AA91-43CA-8FA3-B9D9D5A6456D_at_gmail.com>



If you are diffing timestamps, here is what I came up with after extensive help from this list:

https://dbakerber.wordpress.com/2014/12/19/timestamp-comparison/

Sent from my iPad

> On Feb 14, 2016, at 12:25 PM, MJ Chicago <emjay.mody_at_gmail.com> wrote:
>
> Hello Oracle-L
> Is anyone familiar if Oracle has a timediff function to calculate
> difference in time (seconds/milliseconds/etc) in 11.2.0.3?
> I have an app query where a table is joined onto itself to do this
> manually. Overall performance has been very choppy. The table has
> under 400,000 rows in it with up-to-date stats.
> I am testing a rewrite and tuning outside a package. End goal is this
> would end up in a cursor.
>
> Ran ADDM, increased SGA. Ran SQL Advisor, added recommended indexes.
> Ran SQL Tuning Advisor, added recommended function-based index.
>
> Explain plan shows index range scan under CBO. I have yet to run the
> same with /*+ RULE */ hint.
>
> I am asking two questions here:
> a) compute timediff without having to join table onto itself
> b) any additional recommendation to generally improve query performance
>
> Any suggestions or ideas are greatly appreciated.
>
> Thank you in advance
> MJ
> --
> http://www.freelists.org/webpage/oracle-l
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Sun Feb 14 2016 - 19:31:05 CET

Original text of this message