Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is this a good use for an IOT type table or are therebettersolutions.
Note in-line
-- Regards Jonathan Lewis http://www.jlcomp.demon.co.uk The Co-operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/faq/ind_faq.html April 2004 Iceland http://www.index.is/oracleday.php June 2004 UK - Optimising Oracle Seminar "Brian Peasland" <dba_at_remove_spam.peasland.com> wrote in message news:406343F1.7DB257BB_at_remove_spam.peasland.com...Received on Thu Mar 25 2004 - 16:34:03 CST
> > the date we get is of the form '6/21/2003 00:00:00' they all default to
0
> > hour regardless of the actual hour, to_char will just give us the zero
hour
>
> Then it looks to me like the data was inserted incorrectly. They should
> have inserted SYSDATE into this column, not TRUNC(SYSDATE). By doing so,
> an extra column was forced to be added to capture information that could
> have been captured correctly in one column.
>
It doesn't seem entirely reasonable to criticise the application without knowing what it's most common purpose is. If I spend all my time doing things like: give me the data points for 5:00 every day for the last 4 weeks (which is a typical query in parts of the electricity supply industry) then isolating the hour and date gives me a potential 24x performance benefit, because I don't have to range scan through all the data for the data range, checking the date/time stamp and discarding the wrong hours.