Re: Case for Index Organized table?

  • From: "jaromir nemec" <jaromir@xxxxxxxxxxxx>
  • To: <veeeraman@xxxxxxxxx>, "oracle-l" <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 23 Apr 2007 23:49:48 +0200


> I got a requirement from the developers to build a new table which has a 
> column that will hold every second of every 
> business day. That is the only column in the table. 

if the table will be used in an outer join for a report to get all "possible" 
seconds of a specific interval you may consider a fast dual generation of the 
table (10g). Something like
create or replace view business_seconds as
select /*+ cardinality (86400) */ trunc(sysdate) + (rownum-1) / (24 * 3600) as 
from dual connect by level <= 24*3600;

Generally a care should be taken to define only one day definition,  in case 
that  reports spanning days or at least midnight are possible.



Other related posts: