Minus Operation Obiee

Hi All,
I have created a report utilizing the minus operation as follows:
Person_Wid (Filtered by a set of criteria selected by users via prompts)
minus
Person_wid (Filtered by another set of criteria selected by users via prompts)
I get the correct person_wids.
However I need to calculate count of the person_wid obtained in the result. Can someone tell me how I can achieve this.
Thanks

Hi David,
Thanks for ur suggestion. However the query I am trying to execute is
Person_Wid (Filtered by a set of criteria selected by users via prompts) ----->A
minus
Person_wid (Filtered by another set of criteria selected by users via prompts)--------->B
So when I implement what you suggested I get the count of only 'A'. It does not give me the row count of (A-B). Is there something I need to tweak?
Thanks,
Nikita

Similar Messages

  • MINUS Operator in OBIEE 11g

    Hi all ,
    I have a requirement to use MINUS operator in a column of a report . Since it is available for two separate criteria , Could someone suggest how to perform the same in OBIEE 11g for a column.
    the conditions to be implemented in a column are
    select count(*) from ( 
    select distinct trx.shipment_header_id
    from   
    F_ERP_PO_RECEIPTS_TRX trx
    where   trx.transaction_type = 'RECEIVE'
    MINUS
    select distinct rec.shipment_header_id
    from   
    where   trx.transaction_type = 'DELIVER').
    How can i perform these conditions for a column of a report .
    Reg,
    Niv D

    Hi Niv D,
    I guess this can be done as we have union, union all and minus available.
    once you select the required subject area say SA for the below query,
    select distinct trx.shipment_header_id
    from 
    F_ERP_PO_RECEIPTS_TRX trx
    where   trx.transaction_type = 'RECEIVE'
    on the right side of the criteria you can see a + symbol with venn diagram. once you click on it, it gives you an option to select the next SA for
    select distinct rec.shipment_header_id
    from 
    where   trx.transaction_type = 'DELIVER').
    once you selected that, you can see the criteria changes accordingly.
    there you change to union or minus.
    once you have the conditions for both, make the layout as pivot and apply count on the column. you are there with the result,
    I tried earlier with union but not with minus. but this should work.
    Regards,
    KN
    ebs2obiee.wordpress.com

  • Minus operator versus 'not exists' for faster SQL query

    Hi everybody,
    Does anyone know if rewriting a query to use the MINUS operator instead of using NOT EXISTS in the query is faster, giving all else is the same?
    Thanks very much!
    Bill Loggins
    801-971-6837
    [email protected]

    It really depends on a bunch of factors.
    A MINUS will do a full table scan on both tables unless there is some criteria in the where clause of both queries that allows an index range scan. A MINUS also requires that both queries have the same number of columns, and that each column has the same data type as the corresponding column in the other query (or one convertible to the same type). A MINUS will return all rows from the first query where there is not an exact match column for column with the second query. A MINUS also requires an implicit sort of both queries
    NOT EXISTS will read the sub-query once for each row in the outer query. If the correlation field (you are running a correlated sub-query?) is an indexed field, then only an index scan is done.
    The choice of which construct to use depends on the type of data you want to return, and also the relative sizes of the two tables/queries. If the outer table is small relative to the inner one, and the inner table is indexed (preferrable a unique index but not required) on the correlation field, then NOT EXISTS will probably be faster since the index lookup will be pretty fast, and only executed a relatively few times. If both tables a roughly the same size, then MINUS might be faster, particularly if you can live with only seeing fields that you are comparing on.
    For example, if you have two tables
    EMPLOYEE
    EMPID      NUMBER
    NAME       VARCHAR2(45)
    JOB        VARCHAR2(45)
    HIRE_DATE  DATE
    and
    RETIREE
    EMPID      NUMBER
    NAME       VARCHAR2(45)
    RET_DATE   DATEIf you wanted to see if you had retirees that were not in the employee table, then you could use either MINUS or NOT EXISTS (or even NOT IN, but you didn't ask). However you could possibly get different results.
    SELECT empid,name
    FROM retirees
    MINUS
    SELECT empid,name
    FROM employeeswould show retirees not in the emp table, but it would also show a retiree who had changed their name while retired. A safer version of the above using MINUS would be
    SELECT empid,name
    FROM retirees
    WHERE empid IN (SELECT empid
                    FROM retirees
                    MINUS
                    SELECT empid
                    FROM employees)A full scan of retirees, a full scan of employees (Assuming indexes on both, then maybe an index fast full scan) and two sorts for the minus, at best an index probe then table access by rowid on retirees, possibly a full scan of retirees for the outer query.
    Assuming that employees is indexd on empid then
    SELECT empid,name
    FROM retirees
    WHERE NOT EXISTS (SELECT 1
                      FROM employees
                      WHERE retirees.empid = employees.empid)requires a full scan of retirees and an index access into employees index for each row.
    As with most things SQL, the only real way to tell is to benchmark.
    HTH
    John

  • The MINUS operator in SQL

    Hi
    i use this minus operator to find the non matching row of the second query.
    after looking at the reasult of this query , i searched the one result in the second query alone i could see the data.
    it's worng The MINUS query returns all rows in the first query that are not returned in the second query.
    in my case it's returning the rows which returned by the second query.
    (select distinct lower(trim(to_char(sso))),lower(trim(to_char(region))),to_date(expiration_date,'DD-MM-YY') from ca_ourc_view
    where rownum <1001
    minus
    (select distinct lower(trim(to_char(sso))),lower(trim(to_char(region))),to_date(expiration_date,'DD-MM-YY') from ourc_members_v1@gesprd
    where rownum <1001
    )thanks
    Raj

    in my case it's returning the rows which returned by the second query.can't happen like this
    for example
    SQL> select * from scott.emp where empno=7369
      2  minus
      3  select * from scott.emp where empno=7499;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20

  • Minus operations on table

    Hi everyone,
    I am trying to find a way to do minus operations on table. I know this is possible in SQL, but I have yet to find out how to do it in ABAP. Can anyone help?
    What I need to do is the following.
    Let table A = (A,B,C,D,E) and table B = (B,C,E), then A minus B would return (A,D). Is there a function in ABAP for this?
    Thank you very much in advance.
    Philip R. Jarnhus

    hello,
    u can use subqueries:
    http://help.sap.com/saphelp_NW04/helpdata/en/dc/dc7614099b11d295320000e8353423/content.htm
    it is easy, but wrong way to solve your problem. This select will make a lot of calls to your DB.
    better way:
    1) two selects from table 1 and table 2 into two different internal tables.
    define two internal tables in your code. One table should have standard tables type and another hashed tables type with unique.
    2) subtract the result:
    loop at it_1 into ls_1.
      lv_tabix = sy-tabix.
      read table lt_1 transporting no fields with table key column_name =  ls_1-column_name.
    check sy-subrc eq 0.
      delete it_1 index lv_tabix.
    endloop.
    this solution will speed up your application.

  • Use of double Minus operator....

    Hi ,
    I have a situation where i need to use the minus operator in such a way that:
    <sql_statement_A>
    Minus
    <sql_statement_B>
    Minus
    <sql_statement_C>
    The resulting row set will return rows from sql_statement_A minus rows from sql_statement_B or sql_statement_A minus rows from sql_statement_C... Is the above sql pattern is correct....or , do i need to write two views
    <sql_statement_A>
    Minus
    <sql_statement_B>
    and
    <sql_statement_A>
    Minus
    <sql_statement_C>
    and one third making Union of the two above...????
    many thanks,
    Simon

    If in doubt, use parentheses to make them run the way you want.
    So..
    (<sql_statement_A>
    minus
    <sql_statement_B>)
    minus
    <sql_statement_C>
    Just like OR conditions in the where clause, grouping with parentheses will greatly help those who come later to maintain it. And this looks simpler and more efficient than using two minus operations and combining the result.

  • MINUS operation with remote table

    Hi all,
    Please help me with this problem.
    I have two tables with 20 columns each, one table resides on one database and the other table is accesed through a db link. Both tables contains +800,000 records.
    I need to know the record differences between these two tables - this is a periodical process, not for once- , I am using a MINUS operation with full scan, the problem is that my query is taking long time to finish : +20 min. Also i tried witn COLUMN IN() instead MINUS but my query performance is worst.
    Do you know another way to get the record differences with a better performance?
    Thanks in advance
    Edited by: Osymad on Jun 18, 2012 5:12 PM

    Osymad wrote:
    Hi all,
    Please help me with this problem.
    I have two tables with 20 columns each, one table resides on one database and the other table is accesed through a db link. Both tables contains +800,000 records.
    I need to know the record differences between these two tables - this is a periodical process, not for once- , I am using a MINUS operation with full scan, the problem is that my query is taking long time to finish : +20 min. Also i tried witn COLUMN IN() instead MINUS but my query performance is worst.
    Do you know another way to get the record differences with a better performance?
    Thanks in advance
    Edited by: Osymad on Jun 18, 2012 5:12 PMhttp://www.oracle.com/technetwork/issue-archive/2005/05-jan/o15asktom-084959.html
    Search for "Comparing the Contents of Two Tables"
    Cheers,

  • Minus operator abnormal behavior question

    Oracle 10gR2/Oracle 11g on Windows 2003 R2 32-bit
    There is a very weird query with minus, it is basically:
    select id from table1 where xxxx  --> query 1
    minus
    select id from table1 where xxxx  --> query 2the queries are against the same table, only difference is the where clause. There are 3rd party implemented type and index being used in the where clause in both queries.
    query 1 returns 100 records (i.e. all the records in table1), query 2 returns 0 record.
    but with the minus operator, it returns 1 record.
    If I modify query 2, remove the 3rd party type/index, use another filter that will return 0 record too, then the minus query returns 100 records correctly.
    If I modify the whole query to use not in/not exist instead of minus, then query returns 100 records correctly.
    Question: is it possible the 3rd party type/index can cause the minus operator to behave this way?
    Edited by: modeler on Nov 18, 2009 3:15 PM
    Edited by: modeler on Nov 18, 2009 3:16 PM

    Is there any way you can put together a representative test case that we can test here?

  • MINUS operator fetches invalid record count

    Hi,
    One of the application team complained that oracle MINUS operator fetches an invalid record count after data load.
    Here are the details of the data load:
    They are using source as PROD and target as UAT.
    They are replicating the data on UAT environment in schema A from fetching the data in PROD from the same schema.
    After load when we query the count of records in UAT it shows more records in target, that is in UAT, than PROD.
    When they use MINUS operator to fetch the extra records in UAT, it shows no rows selected.
    SQL> select 'A' count(1) from A.UAT union all select 'A' count(1) from A.PROD@BISLSPD1;
    A COUNT(1)
    A.UAT 19105022
    A.PROD 19104995
    SQL> select distinct count(*) from (select distinct DW_DISCOUNT_KEY, DW_DISCOUNT_MODIFIER_KEY from A.UAT minus select distinct DW_DISCOUNT_KEY, DW_DISCOUNT_MODIFIER_KEY from A.PROD@BISLSPD1);
    COUNT(*)
    0
    SQL> select distinct DW_DISCOUNT_KEY, DW_DISCOUNT_MODIFIER_KEY from A.UAT minus select distinct DW_DISCOUNT_KEY, DW_DISCOUNT_MODIFIER_KEY from A.PROD@BISLSPD1
    no rows selected
    Please note that both are partitioned tables and they are using Informatica Data Replication 9.5 tool to populate the data from source to target.
    Not sure if this could be a bug or an issue.
    PROD DB Version: 10.2.0.5
    UAT DB Version: 10.2.0.5
    Both are in Linux 2.6
    Please throw some light on this.

    974065 wrote:
    SQL> select 'A' count(1) from A.UAT union all select 'A' count(1) from A.PROD@BISLSPD1;
    A                  COUNT(1)
    A.UAT                     19105022
    A.PROD                   19104995
    SQL> select distinct count(*) from (select distinct  DW_DISCOUNT_KEY, DW_DISCOUNT_MODIFIER_KEY from A.UAT minus select distinct DW_DISCOUNT_KEY, DW_DISCOUNT_MODIFIER_KEY from A.PROD@BISLSPD1);
    COUNT(*)
    0
    SQL> select distinct  DW_DISCOUNT_KEY, DW_DISCOUNT_MODIFIER_KEY from A.UAT minus select distinct DW_DISCOUNT_KEY, DW_DISCOUNT_MODIFIER_KEY from A.PROD@BISLSPD1
    no rows selected
    Given that you've go "distinct" in your query, you're eliminating duplicates from each table (and MINUS implicitly means distinct anyway). Check for duplicates (of dw_discount_key, dw_discount_modifier_key) in both tables.
    If the combination is actually unique, I would check that you actually had the raw results the right way round - MINUS is not symmetrical, and for a complete picture you need to look at (select from uat minus select from prod) union all (select from prod minus select from uat)
    Regards
    Jonathan Lewis

  • Error while doing MINUS operation

    Hi ,
    i am using MINUS operation.I am getting the error
    *State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 59019] All of the input streams to the Union operator should have an identical number of columns and union compatible data types. (HY000)*
    I used same data type and i checked with rpd also its working fine.Where is the problem .Can any one help me out??
    Thanks,
    Saichand.V

    hi,
    Thanks for u quick response
    Those are from two Different tables.in Fx i didn't used any operations.Just pulled certain columns.one column is prompted in both the reports.

  • Error using minus operator

    table a
    =========
    id (number),name varchar2,dt date
    10,'aaa','01-01-2006'
    11,'bbb','01-01-2007'
    table b
    ======================
    id varchar2,name varchar2,dt varchar2
    '10','aaa','01-01-2006'
    is it possible to find out which row is not in table b but it is in table a
    i have tried out using minus operator but it return error (ora-01790-expression must have same datatype.

    ora-01790-expression must have same datatypeAnd what is it precisely is it about that error message which is confsuing you?
    SQL> select 1 from dual
      2  minus
      3  select dummy from dual
      4  /
    select 1 from dual
    ERROR at line 1:
    ORA-01790: expression must have same datatype as corresponding expression
    SQL> select to_char(1) from dual
      2  minus
      3  select dummy from dual
      4  /
    T
    1
    SQL> Cheers, APC

  • Using the minus operator

    I am very new to oracle and am working with the minus operator to run a query. I could use some help!
    Here is the query I am working on:
    select suppliername, partname
    from quote
    where partname = 'hammer'
    minus
    select suppliername, partname
    from quote
    where partname = 'hammer';
    HOW DO I GET THE QUERY TO DISPLAY ONLY THE ROWS OF SUPPLIERNAMES THAT SUPPLY ONLY HAMMERS?
    I WOULD GREATLY APPRECIATE SOME CLARIFICATION.

    HOW DO I GET THE QUERY TO DISPLAY ONLY THE ROWS OF SUPPLIERNAMES THAT SUPPLY ONLY HAMMERS?It may, for some data related reason, give you the result you were expecting, but this query does not answer that question because you have included partname in the MINUS.
    E.g.
    WITH quote AS
    (SELECT 'BOB'  suppliername, 'HAMMER' partname FROM DUAL UNION ALL
    SELECT 'BOB'  suppliername, 'SPANNER' partname FROM DUAL UNION ALL
    SELECT 'TIM'  suppliername, 'HAMMER' partname FROM DUAL UNION ALL
    SELECT 'JACK' suppliername, 'HAMMER' partname FROM DUAL)
    SELECT suppliername, partname
    FROM   quote
    MINUS
    SELECT suppliername, partname
    FROM   quote
    WHERE  partname != 'HAMMER';
    SUPPLIERNAME PARTNAME
    BOB          HAMMER  
    JACK         HAMMER  
    TIM          HAMMER   Clearly this is wrong because Bob supplies spanners (aka wrench).
    However:
    WITH quote AS
    (SELECT 'BOB'  suppliername, 'HAMMER' partname FROM DUAL UNION ALL
    SELECT 'BOB'  suppliername, 'SPANNER' partname FROM DUAL UNION ALL
    SELECT 'TIM'  suppliername, 'HAMMER' partname FROM DUAL UNION ALL
    SELECT 'JACK' suppliername, 'HAMMER' partname FROM DUAL)
    SELECT suppliername
    FROM   quote
    MINUS
    SELECT suppliername
    FROM   quote
    WHERE  partname != 'HAMMER';
    SUPPLIERNAME
    JACK        
    TIM          Amongst the many alternatives - NOT EXISTS:
    WITH quote AS
    (SELECT 'BOB'  suppliername, 'HAMMER' partname FROM DUAL UNION ALL
    SELECT 'BOB'  suppliername, 'SPANNER' partname FROM DUAL UNION ALL
    SELECT 'TIM'  suppliername, 'HAMMER' partname FROM DUAL UNION ALL
    SELECT 'JACK' suppliername, 'HAMMER' partname FROM DUAL)
    SELECT *
    FROM   quote q1
    WHERE  NOT EXISTS (SELECT 1
                       FROM   quote q2
                       WHERE  q2.suppliername = q1.suppliername
                       AND    partname != 'HAMMER');
    SUPPLIERNAME PARTNAME
    JACK         HAMMER  
    TIM          HAMMER  

  • Instead of Minus operation any other ?

    Hi,
    Master Table : book_master
    Master_Pk_No Book_Name Version_no I_User Initial_id
    10 Book1 0 XXX 10
    20 Book1 1 XXX 10
    30 Book1 2 XXX 10
    # Initial id will be same as Master_Pk_No first number
    # I have to take the latest version ( 2 ) and compare with the older version if any records
    are availble in older version i have to fetch that and append that with the
    Child Table : source
    C_PK_NO SEQ_SOURCE UNIT_SEQ O_User
    10 1 1 XXX
    10 2 1 abc
    10 3 2 abc
    10 4 1 ggg
    10 5 2 ggg
    10 6 3 abc
    10 7 4 abc
    20 1 1 XXX
    20 2 1 abc
    20 3 2 abc
    20 4 1 ggg
    20 5 2 ggg
    20 6 1 zzz
    30 1 1 XXX
    30 2 1 abc
    30 3 2 abc
    30 4 1 ggg
    30 5 2 ggg
    30 6 2 XXX
    SELECT seq_source, o_user, unit_seq
    FROM SOURCE
    WHERE c_pk_no IN ( SELECT master_pk_no FROM AER
    WHERE book_name = 'Book1'
    AND version_no = 0 )
    MINUS
    SELECT seq_source, o_user, unit_seq
    FROM SOURCE
    WHERE c_pk_no IN ( SELECT master_pk_no FROM AER
    WHERE book_name = 'Book1'
    AND version_no = 2) ;
    If i execute this query i will get the below result .
    C_PK_NO SEQ_SOURCE UNIT_SEQ O_User
    10 6 3 abc
    10 7 4 abc
    SELECT seq_source, o_user, unit_seq
    FROM SOURCE
    WHERE c_pk_no IN ( SELECT master_pk_no FROM AER
    WHERE book_name = 'Book1'
    AND version_no = 1 )
    MINUS
    SELECT seq_source, o_user, unit_seq
    FROM SOURCE
    WHERE c_pk_no IN ( SELECT master_pk_no FROM AER
    WHERE book_name = 'Book1'
    AND version_no = 2) ;
    C_PK_NO SEQ_SOURCE UNIT_SEQ O_User
    20 6 1 zzz
    is it possible to achieve this without minus operation ?
    Regards,
    KBG.

    And here is the test:
    SQL> WITH BOOK_MASTER AS(
      2                      SELECT 10 master_pk_no,'Book1' book_name,0 version_no,'XXX' i_user,10 Initial_id from dual union all
      3                      SELECT 20,'Book1',1,'XXX',10 from dual union all
      4                      SELECT 30,'Book1',2,'XXX',10 from dual
      5                     ),
      6           SOURCE AS (
      7                      SELECT 10 c_pk_no,1 seq_source,1 unit_seq,'XXX' o_user from dual union all
      8                      SELECT 10,2,1,'abc' from dual union all
      9                      SELECT 10,3,2,'abc' from dual union all
    10                      SELECT 10,4,1,'ggg' from dual union all
    11                      SELECT 10,5,2,'ggg' from dual union all
    12                      SELECT 10,6,3,'abc' from dual union all
    13                      SELECT 10,7,4,'abc' from dual union all
    14                      SELECT 20,1,1,'XXX' from dual union all
    15                      SELECT 20,2,1,'abc' from dual union all
    16                      SELECT 20,3,2,'abc' from dual union all
    17                      SELECT 20,4,1,'ggg' from dual union all
    18                      SELECT 20,5,2,'ggg' from dual union all
    19                      SELECT 20,6,1,'zzz' from dual union all
    20                      SELECT 30,1,1,'XXX' from dual union all
    21                      SELECT 30,2,1,'abc' from dual union all
    22                      SELECT 30,3,2,'abc' from dual union all
    23                      SELECT 30,4,1,'ggg' from dual union all
    24                      SELECT 30,5,2,'ggg' from dual union all
    25                      SELECT 30,6,2,'XXX' from dual
    26                     )
    27  SELECT  s.seq_source,
    28          s.o_user,
    29          s.unit_seq
    30    FROM  SOURCE s,
    31          BOOK_MASTER a
    32    WHERE s.c_pk_no = a.master_pk_no
    33      AND a.book_name = 'Book1'
    34      AND a.version_no IN (0,2)
    35    GROUP BY s.seq_source,
    36             s.o_user,
    37             s.unit_seq
    38    HAVING MAX(a.version_no) = 0
    39  /
    SEQ_SOURCE O_U   UNIT_SEQ
             6 abc          3
             7 abc          4
    SQL> WITH BOOK_MASTER AS(
      2                      SELECT 10 master_pk_no,'Book1' book_name,0 version_no,'XXX' i_user,10 Initial_id from dual union all
      3                      SELECT 20,'Book1',1,'XXX',10 from dual union all
      4                      SELECT 30,'Book1',2,'XXX',10 from dual
      5                     ),
      6           SOURCE AS (
      7                      SELECT 10 c_pk_no,1 seq_source,1 unit_seq,'XXX' o_user from dual union all
      8                      SELECT 10,2,1,'abc' from dual union all
      9                      SELECT 10,3,2,'abc' from dual union all
    10                      SELECT 10,4,1,'ggg' from dual union all
    11                      SELECT 10,5,2,'ggg' from dual union all
    12                      SELECT 10,6,3,'abc' from dual union all
    13                      SELECT 10,7,4,'abc' from dual union all
    14                      SELECT 20,1,1,'XXX' from dual union all
    15                      SELECT 20,2,1,'abc' from dual union all
    16                      SELECT 20,3,2,'abc' from dual union all
    17                      SELECT 20,4,1,'ggg' from dual union all
    18                      SELECT 20,5,2,'ggg' from dual union all
    19                      SELECT 20,6,1,'zzz' from dual union all
    20                      SELECT 30,1,1,'XXX' from dual union all
    21                      SELECT 30,2,1,'abc' from dual union all
    22                      SELECT 30,3,2,'abc' from dual union all
    23                      SELECT 30,4,1,'ggg' from dual union all
    24                      SELECT 30,5,2,'ggg' from dual union all
    25                      SELECT 30,6,2,'XXX' from dual
    26                     )
    27  SELECT  s.seq_source,
    28          s.o_user,
    29          s.unit_seq
    30    FROM  SOURCE s,
    31          BOOK_MASTER a
    32    WHERE s.c_pk_no = a.master_pk_no
    33      AND a.book_name = 'Book1'
    34      AND a.version_no IN (1,2)
    35    GROUP BY s.seq_source,
    36             s.o_user,
    37             s.unit_seq
    38    HAVING MAX(a.version_no) = 1
    39  /
    SEQ_SOURCE O_U   UNIT_SEQ
             6 zzz          1
    SQL> SY.

  • Problem with the minus operator - Urgent

    Hi,
    I am executing one source minus target query which is taking a lot of time to run (more than a day) in TEST and PROD environment.
    But when i run the same query DEV it is workin fine giving results in few seconds.
    Individual query is also takin less time as there are only some 10k records in target table and in source depending upon the date condition(max 500 rows).
    I checked the indexes of DEV, test AND PROD. All are same.
    Can any one help me in this.
    ASAP.
    Thanks in advance,
    Harsha

    dev - explain plan
    Operation     Object Name     Rows     Bytes     Cost     Object Node     In/Out     PStart     PStop
    SELECT STATEMENT Optimizer Mode=ALL_ROWS     1           4507                     
    SORT AGGREGATE          1                               
    VIEW          4           4507                     
    MINUS                                        
    SORT UNIQUE          4      2 K     256                     
    HASH JOIN OUTER          4      2 K     255                     
    NESTED LOOPS          1      444      223                     
    HASH JOIN          37      10 K     28                     
    FILTER          61      4 K     23                     
    REMOTE                              SERIAL          
    REMOTE          1      105      2           SERIAL          
    REMOTE          t1(source) 1      72      1           SERIAL          
    REMOTE          t2(source) 10 K     1 M     32           SERIAL          
    SORT UNIQUE          6 K     406 K     4251                     
    HASH JOIN          6 K     406 K     4183                     
    TABLE ACCESS FULL     t1(target) 11 K     439 K     87                     
    TABLE ACCESS FULL     t2 target) 372 K     8 M     4076           
    test explain plan -
    Operation     Object Name     Rows     Bytes     Cost     Object Node     In/Out     PStart     PStop
    SELECT STATEMENT Optimizer Mode=ALL_ROWS     1           4958                     
    SORT AGGREGATE          1                               
    VIEW          235           4958                     
    MINUS                                        
    SORT UNIQUE          235      124 K     703                     
    CONCATENATION                                        
    HASH JOIN OUTER          219      115 K     271                     
    NESTED LOOPS          2      870      211                     
    NESTED LOOPS          2      826      209                     
    HASH JOIN          47      12 K     66                     
    FILTER          74      5 K     60                     
    REMOTE                         SERIAL          
    REMOTE          1      105      2      SERIAL          
    REMOTE          t1(source) 1      75      1      SERIAL          
    REMOTE          t3(source) 1      22      1      SERIAL          
    REMOTE          t2(source) 11 K     1 M     59      SERIAL          
    HASH JOIN OUTER          16      8 K     431                     
    NESTED LOOPS          1      435      371                     
    NESTED LOOPS          1      360      370                     
    NESTED LOOPS          115      37 K     255                     
    HASH JOIN          47      12 K     66                     
    REMOTE          t4(source) 74      5 K     60      SERIAL          
    NESTED LOOPS          106      20 K     5                     
    REMOTE          t5(source) 1      105      2      SERIAL          
    REMOTE          t6(source) 106      9 K     3      SERIAL          
    REMOTE          t7(source) 128      4      SERIAL          
    REMOTE          t3(source) 1      22      1      SERIAL          
    REMOTE          t1(source) 1      75      1      SERIAL          
    REMOTE          t2(source) 11 K     1 M     59      SERIAL          
    SORT UNIQUE          7 K     439 K     4256                     
    HASH JOIN          7 K     439 K     4183                     
    TABLE ACCESS FULL     t1(target)      12 K     474 K     88                     
    TABLE ACCESS FULL     t2(target) 373 K     8 M     4076

  • Query with IN and MINUS operator (Oracle 10g)

    Hi,
    This query will work as per my requiements, my database is 10g.
    eg. Emp_M has all the Employee details, I want to fetch the details of employees from Emp_M table, who are presenet in Emp_GradeA but not in Emp_Bonus table.
    select * from Emp_M where Emp_ID in(
    (select Emp_ID from Emp_GradeA)
    MINUS
    (select Emp_ID from Emp_Bonus))
    I read in Oracle 8 or 8i books , IN has more priority than MINUS, so
    select * from Emp_M where Emp_ID in (
    (select Emp_ID from Emp_GradeA)
    will work first and then the remainin part. But I need the other way, first apply MINUS and then IN.
    Thanks in advance.
    Rizly

    Your original query should work fine, because you are using parenthesis to tell which part of the query get's executed first.
    Did you try running it in 8?

Maybe you are looking for

  • Capacity Planner - What metrics datas are sent across to VMware

    Hi, I'm looking for some detail information of the capacity planner data that is going out of customer environment. This is needed for a migration project that I'm current working on it, where we do lot of P2V consolidation. The environment is a secu

  • Need help with passing a variable in a function

    Hello. I am working on a Flash app that needs to play videos. I have code using netstream that works great for one movie. The problem is I have 3 movies I want to play and I need to figure out how to replace the string variable with the correct path

  • The LCD just doesn't show anything...!!

    Dear all, My computer just didn't show anything on the 17" LCD monitor last night, when I tried starting it after back home. At first I thought the computer itself couldn't start up. But after some tries, I found that the system actually was finished

  • How the data is stored in Info cube...in the back end what will happen???

    Hi Experts, How the data is stored in Info cube and DSO...in the back end what will happen??? I mean  Cube contain Fact table and Dimension tables How the data will store and what will happen in the backend??? Regards, Swetha.

  • Issue with calling restful services via HTTP in an Orchestration

    The company I work for is using RESTful services for our I/O. We are processing EDI files using Biztalk, and are calling the REST services via HTTP from a c# code called within the orchestration. At lower volumes, the service performs fine, but at hi