Re: Case for Index Organized table?

  • From: "Gints Plivna" <gints.plivna@xxxxxxxxx>
  • To: Mark.Brady@xxxxxxxxxxxxxxxxx
  • Date: Tue, 24 Apr 2007 11:49:49 +0300

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@xxxxxxxxxxxxxxxxx>:


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


Other related posts: