ROLLUP AND CUBE OPERATORS IN ORACLE 8I

제품 : PL/SQL
작성날짜 : 2000-06-29
========================================
ROLLUP AND CUBE OPERATORS IN ORACLE 8I
========================================
PURPOSE
ROLLUP 과 CUBE Operator에 대해 설명하고자 한다.
Explanation
ROLLUP operator는 SELECT문의 GROUP BY절에 사용된다.
SELECT절에 ROLLUP 을 사용함으로써 'regular rows'(보통의 select된 data)와
'super-aggregate rows'(총계)을 구할 수 있다. 기존에는 select ... union select
를 이용해 구사해야 했었던 것이다. 'super-aggregate rows'는 'sub-total'
(중간 Total, 즉 소계)을 포함한다.
CUBE operator는 Cross-tab에 대한 Summary를 추출하는데 사용된다. 모든 가능한
dimension에 대한 total을 나타낸다. 즉 ROLLUP에 의해 나타내어지는 item total값과
column total값을 나타낸다.
NULL값은 모든 값에 대한 super-aggregate 을 나타낸다. GROUPING() function은
모든 값에 대한 set을 나타내는 null값과 column의 null값과 구별하는데 쓰여진다.
GROUPING() function은 GROUP BY절에서 반드시 표현되어야 한다. GROUPING()은 모든
값의 set을 표현합에 있어서 null이면 1을 아니면 0을 return한다.
ROLLUP과 CUBE는 CREATE MATERIALIZED VIEW에서 사용되어 질수 있다.
Example
아래와 같이 테스트에 쓰여질 table과 data을 만든다.
create table test_roll
(YEAR NUMBER(4),
REGION CHAR(7),
DEPT CHAR(2),
PROFIT NUMBER );
insert into test_roll values (1995 ,'West' , 'A1' , 100);
insert into test_roll values (1995 ,'West' , 'A2' , 100);
insert into test_roll values (1996 ,'West' , 'A1' , 100);
insert into test_roll values (1996 ,'West' , 'A2' , 100);
insert into test_roll values (1995 ,'Central' ,'A1' , 100);
insert into test_roll values (1995 ,'East' , 'A1' , 100);
insert into test_roll values (1995 ,'East' , 'A2' , 100);
SQL> select * from test_roll;
YEAR REGION DE PROFIT
1995 West A1 100
1995 West A2 100
1996 West A1 100
1996 West A2 100
1995 Central A1 100
1995 East A1 100
1995 East A2 100
7 rows selected.
예제 1: ROLLUP
SQL> select year, region, sum(profit), count(*)
from test_roll
group by rollup(year, region);
YEAR REGION SUM(PROFIT) COUNT(*)
1995 Central 100 1
1995 East 200 2
1995 West 200 2
1995 500 5
1996 West 200 2
1996 200 2
700 7
7 rows selected.
위의 내용을 tabular로 나타내어 보면 쉽게 알 수 있다.
Year Central(A1+A2) East(A1+A2) West(A1+A2)
1995 (100+NULL) (100+100) (100+100) 500
1996 (NULL+NULL) (NULL+NULL) (100+100) 200
700
예제 2: ROLLUP and GROUPING()
SQL> select year, region, sum(profit),
grouping(year) "Y", grouping(region) "R"
from test_roll
group by rollup (year, region);
YEAR REGION SUM(PROFIT) Y R
1995 Central 100 0 0
1995 East 200 0 0
1995 West 200 0 0
1995 500 0 1
1996 West 200 0 0
1996 200 0 1
700 1 1
7 rows selected.
참고) null값이 모든 값의 set에 대한 표현으로 나타내어지면 GROUPING function은
super-aggregate row에 대해 1을 return한다.
예제 3: CUBE
SQL> select year, region, sum(profit), count(*)
from test_roll
group by cube(year, region);
YEAR REGION SUM(PROFIT) COUNT(*)
1995 Central 100 1
1995 East 200 2
1995 West 200 2
1995 500 5
1996 West 200 2
1996 200 2
Central 100 1
East 200 2
West 400 4
700 7
위의 내용을 tabular로 나타내어 보면 쉽게 알 수 있다.
Year Central(A1+A2) East(A1+A2) West(A1+A2)
1995 (100+NULL) (100+100) (100+100) 500
1996 (NULL+NULL) (NULL+NULL) (100+100) 200
100 200 400 700
예제 4: CUBE and GROUPING()
SQL> select year, region, sum(profit),
grouping(year) "Y", grouping(region) "R"
from test_roll
group by cube (year, region);
YEAR REGION SUM(PROFIT) Y R
1995 Central 100 0 0
1995 East 200 0 0
1995 West 200 0 0
1995 500 0 1
1996 West 200 0 0
1996 200 0 1
Central 100 1 0
East 200 1 0
West 400 1 0
700 1 1
10 rows selected.
===============================================
HOW TO USE ROLLUP AND CUBE OPERATORS IN PL/SQL
===============================================
Release 8.1.5 PL/SQL에서는 CUBE, ROLLUP 이 지원되지 않는다. 8i에서는 DBMS_SQL
package을 이용하여 dynamic SQL로 구현하는 방법이 workaround로 제시된다.
Ordacle8i에서는 PL/SQL block에 SQL절을 직접적으로 위치시키는 Native Dynamic SQL
(참고 bul#11721)을 지원한다.
Native Dynamic SQL을 사용하기 위해서는 COMPATIBLE 이 8.1.0 또는 그 보다 높아야
한다.
SVRMGR> show parameter compatible
NAME TYPE VALUE
compatible string 8.1.0
예제 1-1: ROLLUP -> 위의 예제 1과 비교한다.
SQL> create or replace procedure test_rollup as
my_year test_roll.year%type;
my_region test_roll.region%type;
my_sum int;
my_count int;
begin
select year, region, sum(profit), count(*)
into my_year, my_region, my_sum, my_count
from test_roll
group by rollup(year, region);
end;
Warning: Procedure created with compilation errors.
SQL> show errors
Errors for PROCEDURE TEST_ROLLUP:
LINE/COL ERROR
10/8 PL/SQL: SQL Statement ignored
13/18 PLS-00201: identifier 'ROLLUP' must be declared
SQL> create or replace procedure test_rollup as
type curTyp is ref cursor;
sql_stmt varchar2(200);
tab_cv curTyp;
my_year test_roll.year%type;
my_region test_roll.region%type;
my_sum int;
my_count int;
begin
sql_stmt := 'select year, region, sum(profit), count(*) ' ||
'from test_roll ' ||
'group by rollup(year, region)';
open tab_cv for sql_stmt;
loop
fetch tab_cv into my_year, my_region, my_sum, my_count;
exit when tab_cv%NOTFOUND;
dbms_output.put_line (my_year || ' '||
nvl(my_region,' ') ||
' ' || my_sum || ' ' || my_count);
end loop;
close tab_cv;
end;
SQL> set serveroutput on
SQL> exec test_rollup
1995 Central 100 1
1995 East 200 2
1995 West 200 2
1995 500 5
1996 West 200 2
1996 200 2
700 7
PL/SQL procedure successfully completed.
예제 2-1: ROLLUP and GROUPING() -> 위의 예제 2와 비교한다.
SQL> create or replace procedure test_rollupg as
my_year test_roll.year%type;
my_region test_roll.region%type;
my_sum int;
my_count int;
my_g_region int;
my_g_year int;
begin
select year, region, sum(profit),
grouping(year), grouping(region)
into my_year, my_region, my_sum, my_count,
my_g_year, my_g_region
from test_roll
group by rollup(year, region);
end;
Warning: Procedure created with compilation errors.
SQL> show error
Errors for PROCEDURE TEST_ROLLUPG:
LINE/COL ERROR
12/4 PL/SQL: SQL Statement ignored
17/13 PLS-00201: identifier 'ROLLUP' must be declared
SQL> create or replace procedure test_rollupg as
type curTyp is ref cursor;
sql_stmt varchar2(200);
tab_cv curTyp;
my_year test_roll.year%type;
my_region test_roll.region%type;
my_sum int;
my_count int;
my_g_region int;
my_g_year int;
begin
sql_stmt := 'select year, region, sum(profit), count(*), ' ||
'grouping(year), grouping(region) ' ||
'from test_roll ' ||
'group by rollup(year, region)';
open tab_cv for sql_stmt;
loop
fetch tab_cv into my_year, my_region, my_sum, my_count,
my_g_year, my_g_region;
exit when tab_cv%NOTFOUND;
dbms_output.put_line (my_year || ' '||my_region ||
' ' || my_sum || ' ' || my_count ||
' ' || my_g_year || ' ' || my_g_region);
end loop;
close tab_cv;
end;
Procedure created.
SQL> set serveroutput on
SQL> exec test_rollupg
1995 Central 100 1 0 0
1995 East 200 2 0 0
1995 West 200 2 0 0
1995 500 5 0 1
1996 West 200 2 0 0
1996 200 2 0 1
700 7 1 1
PL/SQL procedure successfully completed.
예제 3-1: CUBE -> 위의 예제 3과 비교한다.
SQL> create or replace procedure test_cube as
my_year test_roll.year%type;
my_region test_roll.region%type;
my_sum int;
my_count int;
begin
select year, region, sum(profit), count(*)
into my_year, my_region, my_sum, my_count
from test_roll
group by cube(year, region);
end;
Warning: Procedure created with compilation errors.
SQL> show error
Errors for PROCEDURE TEST_CUBE:
LINE/COL ERROR
10/4 PL/SQL: SQL Statement ignored
13/13 PLS-00201: identifier 'CUBE' must be declared
SQL> create or replace procedure test_cube as
type curTyp is ref cursor;
sql_stmt varchar2(200);
tab_cv curTyp;
my_year test_roll.year%type;
my_region test_roll.region%type;
my_sum int;
my_count int;
begin
sql_stmt := 'select year, region, sum(profit), count(*) ' ||
'from test_roll ' ||
'group by cube(year, region)';
open tab_cv for sql_stmt;
loop
fetch tab_cv into my_year, my_region, my_sum, my_count;
exit when tab_cv%NOTFOUND;
dbms_output.put_line (my_year || ' '||
nvl(my_region,' ') ||
' ' || my_sum || ' ' || my_count);
end loop;
close tab_cv;
end;
Procedure created.
SQL> set serveroutput on
SQL> exec test_cube
1995 Central 100 1
1995 East 200 2
1995 West 200 2
1995 500 5
1996 West 200 2
1996 200 2
Central 100 1
East 200 2
West 400 4
700 7
PL/SQL procedure successfully completed.
예제 4-1: CUBE and GROUPING() -> 위의 예제 4와 비교한다.
SQL> create or replace procedure test_cubeg as
my_year test_roll.year%type;
my_region test_roll.region%type;
my_sum int;
my_count int;
my_g_region int;
my_g_year int;
begin
select year, region, sum(profit),
grouping(year), grouping(region)
into my_year, my_region, my_sum, my_count,
my_g_year, my_g_region
from test_roll
group by cube(year, region);
end;
Warning: Procedure created with compilation errors.
SQL> show error
Errors for PROCEDURE TEST_CUBEG:
LINE/COL ERROR
12/4 PL/SQL: SQL Statement ignored
17/13 PLS-00201: identifier 'CUBE' must be declared
SQL> create or replace procedure test_cubeg as
type curTyp is ref cursor;
sql_stmt varchar2(200);
tab_cv curTyp;
my_year test_roll.year%type;
my_region test_roll.region%type;
my_sum int;
my_count int;
my_g_region int;
my_g_year int;
begin
sql_stmt := 'select year, region, sum(profit), count(*), ' ||
'grouping(year), grouping(region) ' ||
'from test_roll ' ||
'group by cube(year, region)';
open tab_cv for sql_stmt;
loop
fetch tab_cv into my_year, my_region, my_sum, my_count,
my_g_year, my_g_region;
exit when tab_cv%NOTFOUND;
dbms_output.put_line (my_year || ' '||my_region ||
' ' || my_sum || ' ' || my_count ||
' ' || my_g_year || ' ' || my_g_region);
end loop;
close tab_cv;
end;
Procedure created.
SQL> set serveroutput on
SQL> exec test_cubeg
1995 Central 100 1 0 0
1995 East 200 2 0 0
1995 West 200 2 0 0
1995 500 5 0 1
1996 West 200 2 0 0
1996 200 2 0 1
Central 100 1 1 0
East 200 2 1 0
West 400 4 1 0
700 7 1 1
PL/SQL procedure successfully completed.
Reference Ducumment
Note:67988.1

Hello,
As previously posted you should use export and import utilities.
To execute exp or imp statements you have just to open a command line interface, for instance,
a DOS box on Windows.
So you don't have to use SQL*Plus or TOAD.
About export/import you may care on the mode, to export a single or a list of Tables the Table mode
is enough.
Please, find here an example to begin:
http://wiki.oracle.com/page/Oracle+export+and+import+
Hope this help.
Best regards,
Jean-Valentin

Similar Messages

  • Rollup and Cube

    can anyone xplain rollup and cube function in Groupby clause

    Google "rollup and cube in oracle" or
    http://www.psoug.org/reference/rollup.html
    HTH
    Girish Sharma

  • OWB 11.2.0.1 dimension and cube operators + ODBC target database

    Hi,
    We are considering using OWB to populate a netezza data mart making use of the dimension and cube operators.
    Could we use OWB for this/is it supported in this manner or do we need to use another ETL tool/workaround.
    Understand OWB supports ODBC as target.
    Any advice much appreciated.
    Thanks

    Hi
    You can have ODBC targets but the cube/dim operators use MERGE loading type so its not a tested/supported case using the operators with Netezza. It has been optimized for Oracle.
    Cheers
    David

  • Difference between  exists and in operators in oracle?

    what is difference between exists and in operators in oracle?
    what is faster and why?

    Malli wrote:
    what is difference between exists and in operators in oracle?
    what is faster and why?Is this a homework question?
    Have you done any tests yourself to see which is faster?

  • Rollup and Cubes

    Hi
    I am new to use Rollup and Cubes.
    I have one query with the correct syntax as per the tutorial, but i am getting the error.
    Can anyone let me know where and what is the error in this ?
    select cont,ctry,stat, sum(pop) ,
    grouping(cont) as Continent,
    grouping(ctry) as Country,
    grouping(stat) as State
    from dim1
    group by rollup(cont,ctry,stat)
    having (Continent = 1 and Country=1 and State=1)
    or (Country=1 and State=1)
    or (Continent=1 and State=1)
    SQL> /
    or (Continent=1 and State=1)
    ERROR at line 9:
    ORA-00904: "STATE": invalid identifier
    Thanks
    JC

    That syntax is wrong:
    SQL> create table dim1
      2  as
      3  select 'Europe' cont, 'Netherlands' ctry, 'Utrecht' stat, 1000000 pop from dual
      4  /
    Tabel is aangemaakt.
    SQL> select cont,ctry,stat, sum(pop) ,
      2  grouping(cont) as Continent,
      3  grouping(ctry) as Country,
      4  grouping(stat) as State
      5  from dim1
      6  group by rollup(cont,ctry,stat)
      7  having (Continent = 1 and Country=1 and State=1)
      8  or (Country=1 and State=1)
      9  or (Continent=1 and State=1)
    10  /
    or (Continent=1 and State=1)
    FOUT in regel 9:
    .ORA-00904: "STATE": invalid identifierThe error is in the having clause. If we remove it, the SQL becomes valid again:
    SQL> select cont,ctry,stat, sum(pop) ,
      2  grouping(cont) as Continent,
      3  grouping(ctry) as Country,
      4  grouping(stat) as State
      5  from dim1
      6  group by rollup(cont,ctry,stat)
      7  /
    CONT   CTRY        STAT    SUM(POP) CONTINENT  COUNTRY    STATE
    Europe Netherlands Utrecht  1000000         0        0        0
    Europe Netherlands          1000000         0        0        1
    Europe                      1000000         0        1        1
                                1000000         1        1        1
    4 rijen zijn geselecteerd.If you want the having clause, you have to refer to the grouping functions, not the aliases:
    SQL> select cont,ctry,stat, sum(pop) ,
      2         grouping(cont) as Continent,
      3         grouping(ctry) as Country,
      4         grouping(stat) as State
      5    from dim1
      6   group by rollup(cont,ctry,stat)
      7  having (grouping(cont) = 1 and grouping(ctry)=1 and grouping(stat)=1)
      8      or (grouping(ctry)=1 and grouping(stat)=1)
      9      or (grouping(cont)=1 and grouping(stat)=1)
    10  /
    CONT   CTRY        STAT    SUM(POP) CONTINENT  COUNTRY    STATE
    Europe                      1000000         0        1        1
                                1000000         1        1        1
    2 rijen zijn geselecteerd.Regards,
    Rob.

  • Nested tables and multiset operators in Oracle 10g

    Consider the following scenario:
    We have two identical relations R and S defined as:
    CREATE TABLE R(
    a INTEGER,
    b table_type)
    NESTED TABLE b STORE as b_1;
    CREATE TABLE S(
    a INTEGER,
    b table_type)
    NESTED TABLE b STORE as b_2;
    where table_typ is defined as
    CREATE TYPE table_typ AS TABLE OF VARCHAR2(8);
    Suppose we have two instances of R and S, each having one tuple as follows: R(1,table_typ('a','b')) and S(1,table_typ('b','c')).
    I would like to "merge" these two simple instances (e.g., achieve the effect of a simple SELECT * FROM R UNION SELECT * FROM S query) and obtain the following resulting instance: Result(1,table_typ('a','b','c')).
    Would this be possible in Oracle 10g? A simple UNION does not work (I got a "inconsistent datatypes: expected - got SCOTT.TABLE_TYP" error). I also took a look at the MULTISET UNION operator over nested tables available in Oracle 10g, but it doesn't seem to get me anywhere. Any help on this would be greatly appreciated.
    Thank you,
    Laura

    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> CREATE OR REPLACE TYPE table_type AS TABLE OF VARCHAR2 (8);
      2  /
    Type created.
    SQL> CREATE TABLE r(
      2    a INTEGER,
      3    b table_type)
      4    NESTED TABLE b STORE as b_1;
    Table created.
    SQL> CREATE TABLE s(
      2    a INTEGER,
      3    b table_type)
      4    NESTED TABLE b STORE as b_2;
    Table created.
    SQL> INSERT INTO r VALUES (1, table_type ('a', 'b'));
    1 row created.
    SQL> INSERT INTO s VALUES (1, table_type ('b', 'c'));
    1 row created.
    SQL> COLUMN c FORMAT A10;
    SQL> SELECT r.a, r.b MULTISET UNION DISTINCT s.b c
      2  FROM   r, s
      3  WHERE  r.a = s.a;
             A C
             1 TABLE_TYPE('a', 'b', 'c')
    SQL>

  • Roll up command and CUBE command

    Please anyone explain me what is the use of ROLLUP and CUBE command in SQL and which situations it will be using.

    Rollup and cube, both of these will be helpfull in aggregate function along with group by.
    Roll up will results in data along with their summation.
    and Cube results in summation of all possible combination.
    It will be help when creating reports and some analytical data.
    Below is an article which give further more explanation
    http://www.oracle-base.com/articles/misc/rollup-cube-grouping-functions-and-grouping-sets.php

  • Are fact tables and cubes same in OWB?

    Dear all
    A simple question. How can I create a star schema (that is, with a fact table and dimensions) using OWB?
    OWB has options to create cubes, but as per my understanding a cube is not a fact table.
    Cube contains pre-computed data where as fact table contains normal data with references to dimensions.
    Please correct me if I am wrong.
    thanks in advance

    These are just different levels of abstraction.
    "Cube" is the highest level of abstraction referring to the overall package of data.
    "Star schema" is how cubes are modelled showing the relationships from a fact entity to the dimension entities.
    Relational and OLAP are different methods of physical implementation.
    In OWB, to promote sharing of dimensions across cubes to avoid inconsistency the idea is you define and build the dimensions independently. Then you define the "cubes" as measures and references to the dimensions. When you build the "cube" you pass in business identifiers from the source data which OWB will use to link the measures to the applicable dimension data. Due to the wonders of inner joins anyone reading the "cube" will only see dimension data related to the data in that cube!
    Using OWB you do not need to be concerned with the physical implementation when you use the dimension and cube operators as those operators know what to do.

  • How to delete the rollup and compress request from the cube

    Hi Experts,
    I have a requirement, one request was updated into the cube and it was been rollup and then compressed.  As the request was compressed so based on request id we cant perform the deletion.
    So it is possible with selective deletion.  Now before performing the selective deletion do i need to deactivate the aggregates. 
    Help me out on this.
    Regards
    Prasad

    Hi.........
    U hav to deactivate the aggregates................bcoz.........Selective deletion is only possible with uncompressed requests...............ie from F fact table...........after compression data moves from F fact table to E fact table.............. you can't do selective deletion on E fact table.........So first deactivate the aggregates............then do the selective deletion..............then again activate the aggregates..............and do the aggregate filling job manually in RSA1..............but I will suggest u delete the request...............bcoz any how u hav to deactivate the aggregates............and in case of selective deletion u hav to be very particular................if ur load is not taking much time............then delete the request and repeat the load............
    Regards,
    Debjani...........

  • Logical operators in Oracle select query

    Hello all,
    Can i use logical operators in oracle select queries?
    for 1 and 0 =0 ; 1 or 0 =0
    if i have two fileds in a table COL1 have a value of 1010 and COL2 have a value of 0001.
    Is there any way to use select col1 or col2 from table? where or is a logical operator?
    Regards,

    Hi,
    NB wrote:
    Hello all,
    Can i use logical operators in oracle select queries?Sure; Oracle has the logical operators AND, NOT and OR. All the comparison operators, including >, >=, = !=, EXISTS, IN, IS NULL, LIKE and REGEXP_LIKE are really logical operators, since they return logical values. You can use them in SELECT statements, and other places, too.
    for 1 and 0 =0 ; 1 or 0 =0
    if i have two fileds in a table COL1 have a value of 1010 and COL2 have a value of 0001.It's unclear what you want. Maybe you'd be interested in the BITAND function:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/functions014.htm#sthref1080
    BITAND is the only logical function that I know of. Many other functions, especially numberical fucntions such as MOD, have applications in logic.
    Is there any way to use select col1 or col2 from table? where or is a logical operator?Whenever you have a question, please post a little sample data (CREATE TABLE and INSERT statements), and also post the results you want from that data.
    Explain how you get those results from that data.
    Always say which version of Oracle you're using.

  • Data in DSO and CUBE

    Hi Experts
    Please..Please update me on in detail if possible with example ......Key Fields and Dimensions
    How Data Records will be processed in DSO and  Cube
    I tried to search but i can't able to find what i am looking for
    My Requirment:
    I am extracting Employee Benefits records from Non SAP Source System (Oracle Tables)
    In the Oracle there is no Date field avaliable and there won't be any history avaliable in oracle once the Benefits of an employee is changed the old record will be overwritten to new one so they can't track the employee benefits history...but in BW i need to store/show history of employee benefits by Cal day
    Oracle Table Fields
    Location (Primary Key)
    Emp No (Primary Key)
    Insurance Type
    Call Allowance Type
    Annual Leave (No of day Days)
    Pension Schem
    Company Laptop (Yes/No)

    hi,
    key fields are the primary keys of ur ods tables. based on the key field values the data fields will get overwritten.
    suppose if the key fields values were same then the data fields will get overwritten. but the changes were captured in the change log table, hence the history of changes is available.
    Dimensions- are the prmary keys of cube. but in cube only addition of records will happen as default not overwrite as in ods.
                       dimension ids were generated based on the sid values of characteristics.
    maximum of 16 key fields and dimensions can be there in ods and cube respectively.
    for ur case, include 0calday field in the key fields and use the routine to update the field with system date(SY-Date). this keeps track/ else without date also , change log maintains history for each load.
    have to add 0recordmode to the communication structure of the ods(infosource).
    Ramesh

  • Relation between Rollup and compression.

    Hi All,
    Is there a relation between rollup and compression ? i.e if i compress the cube, will the rollup job be faster ?

    Hi,
    Thanks for all your replies. Now the picture is crystal clear.
    1. A compression job moves data from F table to E table. This is also applicable for aggregates. If you schedule a compression job for a cube, the aggregates are automatically compressed( You can also compress aggregates of a cube without compressing the cube. There are programs avalibale for the same).
    2. Assume that you have not done compression . If you load the data to base cube ,it takes more time to create the indexes after loading.
    3) Assume that you have done compression . If you load the data to base cube ,it takes less time than 2 point to create the indexes after loading.
    On similar lines, if aggregates of a cube  are compressed before rollup, then rollup will be faster. This is what exactly I have experienced. I had a cube which had 1000 request. It was never compressed. The rollup job for the cube used to take around 60,000 seconds. I compressed 900 requests. Now the rollup job gets over in 2400 seconds.So the conclusion is the following:
    <b>When aggregates of a cube are compressed, the rollup job runs faster.</b>
    Message was edited by: Tej Trivedi

  • How to import SH Sample Dimensions and Cubes with OWB Client

    Hi, is there a functionality to import the Dimensions and Cubes from the sample to reuse and manipulate them within the OWB Client?
    I can add Dimensions in the Enterprise Manager but mapping should be difficult- right?
    Specs: DB 10g rel2, OWB 10.1.0.4

    dimension - either define a table on your own, or use the data modeler and physically define a new dimension.
    Cube - same as above.
    as for levels and hierarchies, this can also be done in the data modeler. You can specify keys, levels, attributes, measures...all that stuff for dims and facts. There many tabs on the lower half of the dimension modeler screen that control this.
    Check out the oracle by examples for easy tutorials.

  • Difference between and != operators

    Hi All,
    My question may be very basic to you all
    Please let me know the difference between <> and != operators
    Thanks in advance

    user609996 wrote:
    Sorry to all,
    the operator "<>" is not printed
    I want the difference between "<>" and "!=" operators.And as you've already been told there is no difference between the &lt;&gt; and != operators. They mean the same thing, but are just different representations of it.
    The only difference is that the Oracle forum can't display &lt;&gt; if it is just typed in normally. To show it we have to type &lt and &gt with a ";" after each.

  • Difference vs rollup and aggregation

    Hey guys,
                        I know they are both the same i.e. Rollup and aggregate.  i guess I need to know the difference between MAINTAIN AGGREGATE (when you click on an infocube it gives you the option to maintain aggregate) and ROLLUP (when you go to manage an infocube and click on the tab called Rollup.  Also I need to know if there is a document or an article that would tell me the criteria of creating aggregate. 
    Thanks and your help is much appreciated as always,
    RG

    Hi Ram,
    Rollup is like delta from Cube to the agggregates. When ever we post a new data into Cube, the need to be updated into t he aggregate tables to be visible in reporting. If you have aggregate on a cube, then when new data gets into the cube, there is a process to fill the new data into the aggregate and this process is called roll up.
    Rollup is the process to load deltas into aggregate from cube.While you are creating the aggregate you have to fill the aggregateit is right.. that is initial fill. After that new data will come to cube, thisnew/delta data should be reflected in the aggregate for further reporting.o do this we use to run ROLLUP in the info cube manage option.f it's not rollup and the cube is having aggregate and the aggregate is in active mode, then you won't get latest information in your query.
    <u><b>Importance of Rollup:</b></u>
    1. once you load data into Infocube is to ensure that recent data is available for reporting.
    2. Rollup analyze and updates database statistics for aggregate objects.
    Pls check this link..
    http://help.sap.com/saphelp_nw04/helpdata/en/9a/33853bbc188f2be10000000a114084/frameset.htm
    When you try to maintain/create aggregates, inside the maintain aggregate window, from the drop down menu, there is a propose from query option, try that will help to build an aggregates for you
    Criteria for Aggregation:
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9a/33853bbc188f2be10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/75/21054da1392649948e5b94e4fc4bce/content.htm
    http://help.sap.com/saphelp_erp2004/helpdata/en/82/f2dc37f0f12313e10000009b38f8cf/content.htm
    **Pls assign points if info is useful*
    Regards
    CSM Reddy

Maybe you are looking for