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@xxxxxxxxx> 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
--
//www.freelists.org/webpage/oracle-l