Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Case for Index Organized table?

Re: Case for Index Organized table?

From: Gints Plivna <gints.plivna_at_gmail.com>
Date: Tue, 24 Apr 2007 11:49:49 +0300
Message-ID: <6e49b6d00704240149y37c15c0g226cc748d223b8f5@mail.gmail.com>


Take jaromir's approach of generating all seconds for a day and do a minus operation from your measurement table having measurements for each second except some ie. something like:

select /*+ cardinality (86400) */ trunc(sysdate) + (rownum-1) / (24 * 3600) as second
from dual connect by level <= 24*3600
minus
select date_column
from measurement_table
where trunc(sysdate) = trunc(date_column)

Ahhh ok and if you want between date_x and date_y then of course you have to correct dual approach to generate all seconds for necessary date interval and do minus taking the approproate data from measurement_table.

Gints Plivna
http://www.gplivna.eu

2007/4/24, Brady, Mark <Mark.Brady_at_constellation.com>:
>
>
> Example:
> I have an instrument that measures something (furnace temp, motor speed,
> etc) every second. Occasionally it fails to report the value. Find each
> second that it didn't report between date_x and date_y. What's the best
> way to answer that question?

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Apr 24 2007 - 03:49:49 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US