Re: Inner Join using datetime columns, Performance Issues
SQL is terrible with time, so to facilitate time comparison & duration computaiton it's usually a good idea to move interval computation from between-row SELECT computaitons to within-row INSERT and UPDATE computation. In your case, that'd require something like this table structure ...
id int primary key
... optional other identifying ids, eg of the machine or process neing measured
critical_hard_onset timestamp
critical_soft_onset timestamp
ok_hard_onset timestamp
Now for any such sequence, the values you need are simple within-row subtractions.
It might be further optimised by storing intervals directly ...
id int primary key
... optional other identifying ids, eg of the machine or process neing measured
critical_hard_onset timestamp
interval_to_critical_soft timestamp default null
interval_to_ ok_hard timestamp default null
Subject
Written By
Posted
Re: Inner Join using datetime columns, Performance Issues
January 31, 2014 03:27PM
February 04, 2014 02:02AM
February 04, 2014 09:50AM
February 04, 2014 03:10PM
February 06, 2014 07:00AM
February 06, 2014 02:51PM
February 06, 2014 07:32PM
February 10, 2014 07:53AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.