Using the RPD Union queries

Hello

I need in which I table based on active groups, that is, each group is to have a separate table.

Now my reports queries all active groups. How to design in the RPD.

* We are unable to build the union of all reports.

Let's take an example

A group table

Group key

Column1

Column2

Group B table

Group key

Column1

Group C table

Group key

Column2

Column1 and column2 here's respective information, but for groups of various assets (is there, we have 3 tables)

The tables of dimensions.

Tried to make paintings like LTS for a single logical table. But the query consists of a single table with two columns

Thanks in advance

Rémy Agarwal

1 table of logic with several (NOT an LTS with several joined tables) LTSS valued content of their respective fragmentation.

Update: and don't forget to put "this source must be combined with other sources at this level" = TRUE

Tags: Business Intelligence

Similar Questions

  • With the help of the RPD

    Hi I have a scenario like this construction a report:

    (1) from clause

    (2) where Clause

    (3) group By Clause

    (4) having clause
    (5) select
    (6) order By Clause
    using the RPD
    When I connect analytic page without any change, I generate a report using (running) or especially of clauses.

    Hi I have a scenario like this construction a report:

    (1) from clause

    (2) where Clause

    (3) group By Clause

    (4) having clause
    (5) select
    (6) order By Clause
    using the RPD
    When I connect analytic page without any change, I generate a report using (running) or especially of clauses.

    What is a duty? What you trying to do? Seems silly to me. Give us a context, so that we know what kind of help you need...

  • Please help me with the Alternative of queries to replace the UNION ALL for two queries

    Hi all

    I have the query to retrieve assets employees salary count and in so far as below:

    Select ename, emp_no, sum (sal_till_2010), sum (sal_till_2014) of

    (select emp_no, ename, salary as sal_till_2010, 0 as sal_till_2014 of employee e1

    where effective_date < = 1 January 2010 ' and not exists (select 1 from e2 employee_deletion where e2.emp_no = e1.emp_no and e2.deletion_date < = January 1, 2010 "")

    UNION ALL

    Select ename, emp_no, 0 as sal_till_2010, salary as employee e1 sal_till_2014 - here is a dummy 0 salary until 2010 for the union of all the

    where effective_date < = 1 January 2014 "and not exists (select 1 from e2 employee_deletion where e2.emp_no = e1.emp_no and e2.deletion_date < = 1 January 2014") "

    Group of emp_no, ename;

    In this query, I get the total salary until 2010 and until 2014 in the employee table, dates are dynamically passed to the procedure, and this can change.

    But assume the date above and let me know the alternative of queries to improve performance because I use Union ALL and read the same table twice in the above query.

    Advice me with request to read the table once to fetch the same data as the above query.

    Thanks in advance.


    Hello

    Thanks for the display of the data of the sample; It's very useful!

    I think OP wants something like this:

    WITH cutoff_dates AS

    (

    SELECT TO_DATE (January 1, 2010 ', ' DD/MM/YYYY') AS cutoff_date, 2010 UNDER the label OF dual UNION ALL

    SELECT TO_DATE (1 January 2014 ', "DD/MM/YYYY"), double 2014

    )

    SELECT e.emp_no, e.ename

    , NVL (SUM (CASE WHEN c.label = 2010 THEN e.salary END), 0) AS sal_till_2010

    , NVL (SUM (CASE WHEN c.label = 2014 THEN e.salary END), 0) AS sal_till_2014

    E employee

    JOIN cutoff_dates c ON e.effective_date<=>

    WHERE DOES NOT EXIST)

    SELECT 1

    Of employee_deletion ed

    WHERE ed.emp_no = e.emp_no

    AND ed.deletion_date<=>

    )

    E.emp_no GROUP, e.ename

    ORDER BY e.emp_no

    ;

    Output of your sample data:

    EMP_NO ENAME SAL_TILL_2010 SAL_TILL_2014

    ---------- ------ ------------- -------------

    1 Mickey 450 0

    2 Donald 750 0

  • select_list_from_query using the union

    As a manual, how to have the APEX_ITEM. SELECT_LIST_FROM_QUERY when the query is like
    SELECT 'A' D, 'A' R FROM DUAL UNION ALL
    SELECT 'B' D, 'B' R FROM DUAL UNION ALL
    SELECT 'C' D, 'C' R FROM DUAL UNION ALL
    Please suggest


    Sanjay

    Hello
    >

    select APEX_ITEM.SELECT_LIST_FROM_QUERY(04,NULL,'select 'A' D, 'B' R from DUAL
     union all
     select 'C' D, 'D' R from dual', 'style=""','','YES',' - Select Details - ', 'f04_' || '#ROWNUM#', NULL, 'NO')LR_COURIER from dual
    

    Bracket missing error appears when you run the above code.
    >

    To escape the single quotes shipped like this

    select APEX_ITEM.SELECT_LIST_FROM_QUERY(04,NULL,'select ''A'' D, ''B'' R from DUAL
     union all
     select ''C'' D, ''D'' R from dual', 'style=""','','YES',' - Select Details - ', 'f04_' || '#ROWNUM#', NULL, 'NO')LR_COURIER from dual
    

    See you soon,.

    PS: Or use the q! Construct

    select APEX_ITEM.SELECT_LIST_FROM_QUERY(04,NULL,q'!select 'A' D, 'B' R from DUAL
     union all
     select 'C' D, 'D' R from dual!', 'style=""','','YES',' - Select Details - ', 'f04_' || '#ROWNUM#', NULL, 'NO')LR_COURIER from dual
    

    Published by: Dominique 21 August 2012 16:19

  • Columns of Union two problem using the TO_CLOB function

    Hello

    Let me start by you (a simplified version of) showing the query I'm running:

    SELECT
    l.Person,
    TO_CLOB(l.letter_code ||) "letter has been sent.") Note
    letters l

    UNION

    Select
    n.Person
    n.Note
    n notes

    And here's the table structure

    LETTERS)
    l.Person varchar2 (10);
    l.letter_code varchar2 (2);
    *)*

    NOTES)
    n.Person varchar2 (10);
    CLOB n.note;
    *)*

    Each request runs on its own without any problem but when I union together I get a ' * ORA-00932: inconsistent data types: expected - got CLOB * "error. I can't understand what is the cause. The TO_CLOB in the first query is to convert the varchar2 column in a CLOB then why would he be oppose to be clauses with the second query?

    Any advice would be much appreciated! Thanks :)

    You may not use the set operations, UNIONS, MINUS, INTERSECT with CLOB columns etc. simple as that.

  • Security using ldap and the RPD users

    Hello

    I need 5 dummy users in RPD. I don't want to give them adminstrator privileges because they are not allowed to see everything in my dashboard. My authentication works by using an LDAP server, is it possible that I can leave these fake users login as well as those on the LDAP server?

    I don't think it's possible to use the default Server BI and LDAP authentication. You can still have multiple LDAP servers for authentication. You can ask 5 service accounts to be created in the LDAP for OBIEE Protocol and assign privileges accordingly so they see only needed dashboards.

    Please allow the useful points,

    Thank you
    -Laurence.

  • use of aggregation at level of the RPD

    Hello

    I would like to know one thing
    During the creation of the RPD, there is an option of aggregation for a column.

    But everything by creating a report, also if we drag the column and then change formula, we can do the same thing.

    So what is the advantage of making the RPD level?

    as I use a separate account for a column at the level of the RPD, but then I can do the same thing at value also

    I use obiee 11.1.1.5
    Thank you

    Hello

    Aggregate data at the level of the RPD will be aggregate data instead of having the data and their aggregation and in the responses. His suspected flush of good practices and the optimal implementation of aggregation to the RPD.
    And as said before, this column can be used in many reports in a single report.

    Hope this clears your doubt.

    Concerning
    Lajmi.

  • the use of FILTER - to the RPD HELP?

    Can we use the filter AID in RPD?

    Yes in the window "use existing columns of logic as a source" of a measure.
    Its under functions - functions to display in the expression builder.

  • Several servers of presentation using the same RPD

    Hello world

    While most people know, the iPhone has a cool application that allows you to log in and look at the contents to your OBIEE. In theory, it's really cool, but it turns out that many of the default value of the cool graphics in Flash and Flash is not supported by iPhone.

    With the help of an indicator in the configuration file for instance, default possible of all charts in png instead of Flash. But which causes all the interactive drillability go away since it's just a flat image.

    It seems that an elegant solution to this problem would be to have two services to market; who is by default Flash and which is default PNG. Then allow the OC4J container to determine if the device accessing the Web site is a complete client browser or a mobile device. Mobile devices get routed to the png and no mobile devices go to the standard Flash page.

    Although not supported by Oracle, it is possible to configure several services presentation on the same server. In fact, the MNC has a great blog about how to do this (http://rnm1978.wordpress.com/2009/08/25/multiple-rpds-on-one-server-part-1-the-bi-server/).

    I was able to implement two (AnalyticsWeb and AnalyticsMobile) presentation services and direct them in the same folder from catalog. In this way, you don't have to duplicate you're work.

    The only thing that I could not understand how do was for them point to the same file from RPD. Ideally, we would have a single file of RPD with metadata definitions master, and two presentation of this unique RPD services. However, the BI Survey Server and error of the RPD even appears twice in the file NQSConfig.ini. I also created a shortcut to the RPD master, but at startup, servers BI said it wasn't a valid repository file.

    Worse, I could just use him copy / paste to duplicate the single repository. And then whenever I've updated, I just need to delete the other and copy. But it seems a bit tedious, and I was expecting a more elegant solution.

    Does anyone know how I could get the NQSConfig.ini for me to indicate to the RPD even twice? Is there some kind of symbolic link or image I create?

    If it helps, I work with OBIEE 10.1.3.4 on a Windows Server 2003 environment with the standalone OC4J container.

    Thanks for the help!

    -Joe

    Hey Joe,

    If I understand then you have done all the hard work and lack the wood from the trees :-)

    You do point your two instances of presentation on the DSN even Services!

    instanceconfigWeb.xml would be:

    ...



    AnalyticsWeb
    ...

    instancewebMobile.xml would be:

    ...




    AnalyticsWeb

    PNG

    ...

    I just tested and it works exactly as you wish.

    Try it and tell us if it works - or if I have misunderstood what you are trying to do.

  • How to use the value of the select in SQL queries list

    I have a list with the list of states (P1_STATE) in Page 1. When I send the page, I get the VALUE of P1_STATE in Page 2 to the format: DC:AS:AK. I use the application to display the form in the Page 2 below.

    Select *.
    of STATE_REF
    where IN location_id (: P1_STATE)

    Now the format of P1_STATE will not work in the query. So it's not fetch all results. Is there a way in which the values of the selection list can be used in SQL queries. Thanks for the help.

    Hello

    Try something like:

    select *
    from STATE_REF
    where ':' || :P1_STATE || ':' LIKE '%:' || LOCATION_ID || ':%'
    

    Andy

  • Trying to create the table using Clause any Union with Select multiple stmts

    The motion seeks to get the substring of the value to for example.
    If the value is * ASA 2 * then so do ASA
    where as if the value is * 1.5 TST * it sholud come as TST as wise for others too.
    I am trying to execute stmt SQL written but in error as below:

    * ' ORA-00998 must appoint this expression with the alias column 00998.00000 - must appoint this expression with the column alias. "

    CREATE TABLE TEST_CARE AS
    (
    SELECT row_id, old_care_lvl, SUBSTR(old_care_lvl,3), len test_care_lvl FROM
    WHERE LENGTH (old_care_lvl) = 5
    UNION ALL
    SELECT row_id, old_care_lvl, SUBSTR(old_care_lvl,3), len test_care_lvl FROM
    WHERE LENGTH (old_care_lvl) = 7
    UNION ALL
    SELECT row_id, old_care_lvl, SUBSTR(old_care_lvl,3), len test_care_lvl FROM
    WHERE LENGTH (old_care_lvl) = 14
    UNION ALL
    Row_id SELECT, old_care_lvl, SUBSTR (old_care_lvl, 3), LEN test_care_lvl
    WHERE LENGTH = 7 AND old_care_lvl (old_care_lvl) = "Regular."
    );

    I want to create the table using the above given the multiple selection by using the Union ALL clause, but trying to create run query error like "ORA-00998 must appoint this expression with the alias column 00998.00000 - must appoint this expression with the column alias.

    Please guide me how to approach to solve this problem.
    Thanks in advance.

    Try this->

    CREATE TABLE TEST_CARE
    AS
      select *
      from (
              SELECT row_id, old_care_lvl,SUBSTR(old_care_lvl,3), len FROM test_care_lvl
              WHERE LENGTH(old_care_lvl) =5
              UNION ALL
              SELECT row_id, old_care_lvl,SUBSTR(old_care_lvl,3), len FROM test_care_lvl
              WHERE LENGTH(old_care_lvl) =7
              UNION ALL
              SELECT row_id, old_care_lvl,SUBSTR(old_care_lvl,3), len FROM test_care_lvl
              WHERE LENGTH(old_care_lvl) =14
              UNION ALL
              SELECT row_id, old_care_lvl,SUBSTR(old_care_lvl,3),LEN FROM test_care_lvl
              WHERE LENGTH(old_care_lvl) =7 AND old_care_lvl ='Regular'
          );
    

    N.B.: Not tested...

    Kind regards.

    LOULOU.

  • Is it possible to use the title of column sorting along w / a union?

    When I had a simple select statement, I might get the kind work with either one "in order to" in the select statement or with sorting of the column header.
    Then, I changed the select a Union. I can get the folders to sort if I specify the column number in the order (for example, the order of 9, 7, 1), but the position column sorts do not work. The records look like they are sorted on page 1, but are not sorted on pages 2-5.
    Is it possible to use the title of column sorting and a Union?

    Thank you!
    Laura

    Laura:

    You can re-write the query in the form

    Select col1, col2, col3...
    Of
    (select col1, col2, col3 from T1
    Union
    Select col1, col2, col3 from T2
    )

    CITY

  • I have a problem in direct charge of path where the default values are not met when using the CSV file to load into the database while his is filled everything in plain insert queries

    -The header of the control file, I added a load direct method(append mode)

    OPTIONS(direct=true,Parallel=true,skip_index_maintenance=true,skip_unusable_indexes=true)

    DATA RELATING TO SUNK COSTS

    ADD

    INSERT INTO TEST_TBL

    (

    col1,

    ...

    Col n-2

    );

    Try to use the classic path instead.  With the direct path, many constraints and triggers, and others are disabled.  Please see the next section of the online documentation.

    https://docs.Oracle.com/database/121/Sutil/GUID-973925DA-8F86-49C1-A707-4564DC3B57AE.htm#SUTIL1330

  • How to write queries nested using the DB adapter?

    I want to write a request nested by using the help DB adapter box...

    SELECT INVOICE_ID, FILE_NAME IN BILLING_INVOICE_PDF_V where FILE_ID =)

    (SELECT MAX (FILE_ID) FROM BILLING_INVOICE_PDF_V WHERE (INVOICE_ID = '12345'))) ;

    Thank you

    RAM.

    Hi Ram,

    It's probably the semicolon at the end of the SQL statement that causes the db adapter for error; Simply enter the SQL custom without a semicolon at the end.

    SELECT INVOICE_ID, FILE_NAME IN BILLING_INVOICE_PDF_V where FILE_ID = (SELECT MAX (FILE_ID) OF BILLING_INVOICE_PDF_V WHERE INVOICE_ID = '12345')

  • How to improve the performance of queries

    Hello everyone, this is the first time that I am responsible for investigating the performance of the queries.

    I have no permission to market the autotrace, so I just used the Plan to explain on the table on the development site.

    Here can someone tell me if there are obvious problems with the query below?

    This query is the basis for a single report. The amount of data on the Production site is about 25 times amount of data on the development site.

    User says that they must wait about 10 minutes for the report to load.

    Thank you very much in advance.

    Databases:

    Oracle 11 GR 1 matter (CARS)

    Application running the report is Apex Oracle version 4.0.2

    explain plan for

    Select vw. NPP, vw. PROFILE_NAME, vw. ADDRESS, vw. COMPETENCE, vw. ASSIGNED_CPO_ID,

    VW. STATUS_NAME, vw. DOMICILE_ID, vw. DOMICILE_NAME, vw. OVERPAYMENT_GROUP_ID, vw. CPO_NAME, vw. OCCURRENCES, Act. STATUS_CHANGE_DATE,

    (select name from opay_status where id = ACTION_ID) action_name,.

    ACTIONED_DATE, "CLOSED_BY,.

    (select name from OPAY_PAYMENT_SOURCE_TYPES where id = PAY_TYPE_ID) Payment_Source,

    VW. REVIEW_DATE

    ftrx.opay_overpayments_summary_vw vw, OPAY_OVERPAYMENT_ACTIONS Act

    where vw. OVERPAYMENT_GROUP_ID = Act.ID (+) and upper (Volkswagen. <>STATUS_NAME) "TRANSFORMED."

    and OPAY_PROCESSED_OVERPAYMENT (vw. OVERPAYMENT_GROUP_ID) = 'N'

    Union of all the

    Select RPC. NPP, CPP. PROFILE_NAME, CPP. ADDRESS, RPC. COMPETENCE, CPP. ASSIGNED_CPO_ID,

    CPP. STATUS_NAME, CPP. DOMICILE_ID, CPP. DOMICILE_NAME, CPP. OVERPAYMENT_GROUP_ID, CPP. ASSIGNED_CPO_NAME CPO_NAME, cpp.cycle_count OCCURRENCES, CPP. STATUS_CHANGE_DATE,

    CPP.action_name,

    CPP. ACTIONED_DATE, (select name of CPO where id = CPO_ID) CLOSED_BY,.

    CPP. Payment_Source,

    CPP. STATUS_CHANGE_DATE DUMMY_DATE

    the CPP OPAY_CPO_PROFILE_PROCESSED;

    /

    Select * from table (dbms_xplan.display);

    Hash value of plan: 3275359346

    -------------------------------------------------------------------------------------------------------------------------------

    | ID | Operation | Name                         | Lines | Bytes | TempSpc | Cost (% CPU). Time |

    -------------------------------------------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |                              |   260K |    65 M |       | 44949 (4) | 00:09:00 |

    |   1.  UNION-ALL |                              |       |       |       |            |          |

    |   2.   TABLE ACCESS BY INDEX ROWID | OPAY_STATUS |     1.    16.       |     1 (0) | 00:00:01 |

    |*  3 |    INDEX UNIQUE SCAN | OPAY_PK_STATUS |     1.       |       |     0 (0) | 00:00:01 |

    |   4.   TABLE ACCESS BY INDEX ROWID | OPAY_PAYMENT_SOURCE_TYPES |     1.    12.       |     1 (0) | 00:00:01 |

    |*  5 |    INDEX UNIQUE SCAN | OPAY_PK_SOURCE_TYPES |     1.       |       |     0 (0) | 00:00:01 |

    |*  6 |   EXTERNAL RIGHT HASH JOIN |                              |   197K |    86.       | 43459 (1) | 00:08:42 |

    |   7.    TABLE ACCESS FULL | OPAY_OVERPAYMENT_ACTIONS |  1224 | 29376 |       |   209 (0) | 00:00:03 |

    |   8.    VIEW                                | OPAY_OVERPAYMENTS_SUMMARY_VW |   197K |    51 M |       | 43249 (1) | 00:08:39 |

    |   9.     UNION-ALL |                              |       |       |       |            |          |

    | * 10 |      HASH JOIN |                              |     2.   570 |       | 17032 (1) | 00:03:25 |

    | * 11 |       VIEW                             |                              |     2.   560.       |  7456 (1) | 00:01:30 |

    |  12.        KIND OF WINDOW.                              |     2.   278.       |  7456 (1) | 00:01:30 |

    |  13.         NESTED EXTERNAL LOOPS |                              |     2.   278.       |  7455 (1) | 00:01:30 |

    |  14.          NESTED LOOPS |                              |     2.   242.       |  7453 (1) | 00:01:30 |

    | * 15 |           OUTER HASH JOIN |                              |     2.   214.       |  7451 (1) | 00:01:30 |

    |  16.            NESTED EXTERNAL LOOPS |                              |     2.   194.       |  7448 (1) | 00:01:30 |

    | * 17.             TABLE ACCESS FULL | OPAY_OVERPAYMENTS |     2.   168.       |  7447 (1) | 00:01:30 |

    |  18.             TABLE ACCESS BY INDEX ROWID | OPAY_OVERPAYMENT_ACTIONS |     1.    13.       |     1 (0) | 00:00:01 |

    | * 19.              INDEX UNIQUE SCAN | OPAY_PK_OVERPAY_ACTIONS |     1.       |       |     0 (0) | 00:00:01 |

    |  20.            TABLE ACCESS FULL | STATUS                       |     3.    30.       |     3 (0) | 00:00:01 |

    |  21.           TABLE ACCESS BY INDEX ROWID | HOME |     1.    14.       |     1 (0) | 00:00:01 |

    | * 22.            INDEX UNIQUE SCAN | PK_DOMICILE |     1.       |       |     0 (0) | 00:00:01 |

    |  23.          TABLE ACCESS BY INDEX ROWID | CPO                          |     1.    18.       |     1 (0) | 00:00:01 |

    | * 24.           INDEX UNIQUE SCAN | PK_CPO                       |     1.       |       |     0 (0) | 00:00:01 |

    |  25.       VIEW                             |                              |   197K |   963K |       |  9574 (1) | 00:01:55 |

    |  26.        HASH GROUP BY.                              |   197K |  7127K |  8544K |  9574 (1) | 00:01:55 |

    | * 27.         EXTERNAL RIGHT HASH JOIN |                              |   197K |  7127K |       |  7664 (1) | 00:01:32 |

    |  28.          TABLE ACCESS FULL | STATUS                       |     3.     9.       |     3 (0) | 00:00:01 |

    | * 29.          EXTERNAL RIGHT HASH JOIN |                              |   197K |  6549K |       |  7660 (1) | 00:01:32 |

    |  30.           TABLE ACCESS FULL | OPAY_OVERPAYMENT_ACTIONS |  1224 | 11016.       |   209 (0) | 00:00:03 |

    | * 31.           HASH JOIN |                              |   197K |  4816K |       |  7449 (1) | 00:01:30 |

    |  32.            INDEX SCAN FULL | PK_DOMICILE |    73.   292.       |     1 (0) | 00:00:01 |

    |  33.            TABLE ACCESS FULL | OPAY_OVERPAYMENTS |   197K |  4045K |       |  7446 (1) | 00:01:30 |

    | * 34 |      HASH JOIN |                              |   197K |    53 M |  3280K | 26217 (1) | 00:05:15 |

    |  35.       VIEW                             |                              |   197K |   963K |       |  9574 (1) | 00:01:55 |

    |  36.        HASH GROUP BY.                              |   197K |  7127K |  8544K |  9574 (1) | 00:01:55 |

    | * 37 |         EXTERNAL RIGHT HASH JOIN |                              |   197K |  7127K |       |  7664 (1) | 00:01:32 |

    |  38.          TABLE ACCESS FULL | STATUS                       |     3.     9.       |     3 (0) | 00:00:01 |

    | * 39 |          EXTERNAL RIGHT HASH JOIN |                              |   197K |  6549K |       |  7660 (1) | 00:01:32 |

    |  40.           TABLE ACCESS FULL | OPAY_OVERPAYMENT_ACTIONS |  1224 | 11016.       |   209 (0) | 00:00:03 |

    | * 41.           HASH JOIN |                              |   197K |  4816K |       |  7449 (1) | 00:01:30 |

    |  42.            INDEX SCAN FULL | PK_DOMICILE |    73.   292.       |     1 (0) | 00:00:01 |

    |  43.            TABLE ACCESS FULL | OPAY_OVERPAYMENTS |   197K |  4045K |       |  7446 (1) | 00:01:30 |

    | * 44 |       VIEW                             |                              |   197K |    52 M |       | 13757 (1) | 00:02:46 |

    |  45.        KIND OF WINDOW.                              |   197K |    26 M |    28 M | 13757 (1) | 00:02:46 |

    | * 46 |         EXTERNAL RIGHT HASH JOIN |                              |   197K |    26 M |       |  7673 (1) | 00:01:33 |

    |  47.          TABLE ACCESS FULL | CPO                          |    91.  1638.       |     4 (0) | 00:00:01 |

    | * 48 |          EXTERNAL RIGHT HASH JOIN |                              |   197K |    22 M |       |  7667 (1) | 00:01:33 |

    |  49.           TABLE ACCESS FULL | STATUS                       |     3.    30.       |     3 (0) | 00:00:01 |

    | * 50 |           EXTERNAL RIGHT HASH JOIN |                              |   197K |    20 M |       |  7663 (1) | 00:01:32 |

    |  51.            TABLE ACCESS FULL | OPAY_OVERPAYMENT_ACTIONS |  1224 | 15912 |       |   209 (0) | 00:00:03 |

    | * 52 |            HASH JOIN |                              |   197K |    18 M |       |  7452 (1) | 00:01:30 |

    |  53.             TABLE ACCESS FULL | HOME |    73.  1022 |       |     3 (0) | 00:00:01 |

    | * 54 |             TABLE ACCESS FULL | OPAY_OVERPAYMENTS |   197K |    15 M |       |  7448 (1) | 00:01:30 |

    |  55.   TABLE ACCESS BY INDEX ROWID | CPO                          |     1.    18.       |     1 (0) | 00:00:01 |

    | * 56 |    INDEX UNIQUE SCAN | PK_CPO                       |     1.       |       |     0 (0) | 00:00:01 |

    |  57.   TABLE ACCESS FULL | OPAY_CPO_PROFILE_PROCESSED | 63108 |  9429K |       |  1490 (1) | 00:00:18 |

    -------------------------------------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    3 - access("ID"=:B1)

    5 - access("ID"=:B1)

    6 - access("VW".") OVERPAYMENT_GROUP_ID "=" LAW ". "ID" (+)) "

    10 - access("A".") WITH THE ID '=' B '. (' ' ID ')

    11 filter (SUPERIOR ("a.") "<>STATUS_NAME"), "TRANSFORMED" AND "OPAY_PROCESSED_OVERPAYMENT"("A"."" OVERPAYMENT_GROUP_ID') = 'N')

    15 - access("STS".") ID "(+) = TO_NUMBER ("ACT"". ")" STATUS'))

    17 - filter("OPAY".") (OVERPAYMENT_GROUP_ID"IS NULL)

    19 - access("OPAY".") OVERPAYMENT_GROUP_ID "=" LAW ". "ID" (+)) "

    22 - access("OPAY".") DOMICILE_ID "=" DOM ". (' ' ID ')

    24 - access("ACT".") ASSIGNED_CPO_ID "=" DPC ". "ID" (+)) "

    27 - access("STS".") ID "(+) = TO_NUMBER ("ACT"". ")" STATUS'))

    29 - access("OPAY".") OVERPAYMENT_GROUP_ID "=" LAW ". "ID" (+)) "

    31 - access("OPAY".") DOMICILE_ID "=" DOM ". (' ' ID ')

    34 - access("A".") WITH THE ID '=' B '. (' ' ID ')

    37 - access("STS".") ID "(+) = TO_NUMBER ("ACT"". ")" STATUS'))

    39 - access("OPAY".") OVERPAYMENT_GROUP_ID "=" LAW ". "ID" (+)) "

    41 - access("OPAY".") DOMICILE_ID "=" DOM ". (' ' ID ')

    44 filter (SUPERIOR ("a.") "<>STATUS_NAME"), "TRANSFORMED" AND "OPAY_PROCESSED_OVERPAYMENT"("A"."" OVERPAYMENT_GROUP_ID') = 'N')

    46 - access("ACT".") ASSIGNED_CPO_ID "=" DPC ". "ID" (+)) "

    48 - access("STS".") ID "(+) = TO_NUMBER ("ACT"". ")" STATUS'))

    50 - access("OPAY".") OVERPAYMENT_GROUP_ID "=" LAW ". "ID" (+)) "

    52 - access("OPAY".") DOMICILE_ID "=" DOM ". (' ' ID ')

    54 - filter("OPAY".") OVERPAYMENT_GROUP_ID' IS NOT NULL)

    56 - access("ID"=:B1)

    - And this is the content of the function used in the query

    create or replace

    FUNCTION "opay_PROCESSED_OVERPAYMENT" (NUMBER p_opay_group_id) RETURN varchar AS

    fake number;

    result varchar (1);

    BEGIN

    If p_opay_group_id is null returns 'n';

    on the other

    SELECT count (distinct is_processed_yn) in a model of opay_overpayments where overpayment_group_id = p_opay_group_id;

    If dummy <>1 then back 'n';

    On the other

    Select distinct is_processed_yn as a result of opay_overpayments where overpayment_group_id = p_opay_group_id;

    return the result;

    end if;

    end if;

    END;

    - And here are the details of the view.

    CREATE OR REPLACE VIEW 'OPAY_OVERPAYMENTS_SUMMARY_VW '.

    As

    Select one. «' REVIEW_DATE ', a. "ID", a. "NPP", a. "PROFILE_NAME «, a» ADDRESS", a. "COMPETENCE", a"ASSIGNED_CPO_ID", a. "STATUS_NAME", a. "DOMICILE_ID", a. "DOMICILE_NAME", a. "OVERPAYMENT_GROUP_ID", a. "CPO_NAME", a. "OCCURRENCES»

    (select review_date, id, NPP, profile_name, address

    domicile_name, status_name, assigned_cpo_id, competence

    overpayment_group_id, cpo_name

    , count (NPP) over (PARTITION BY ppn) AS OCCURRENCES

    (SELECT review_date, id, NPP, profile_name, address, assigned_cpo_id

    status_name, domicile_id, domicile_name

    overpayment_group_id, cpo_name

    OF ftrx.opay_overpayments_vw

    where overpayment_group_id is null)) a

    Join (select max (id) id, overpayment_group_id, NPP group opay_overpayments_vw by overpayment_group_id, ppn) b

    on all the a.id = b.id union

    Select one. "' REVIEW_DATE ', a." ID ", a." NPP ", a." PROFILE_NAME «, a» ADDRESS ", a." COMPETENCE ", a" ASSIGNED_CPO_ID ", a." STATUS_NAME ", a." DOMICILE_ID ", a." DOMICILE_NAME ", a." OVERPAYMENT_GROUP_ID ", a." CPO_NAME ", a." OCCURRENCES "(select review_date, id, NPP

    profile_name

    address

    skill

    assigned_cpo_id

    status_name

    domicile_id

    domicile_name

    overpayment_group_id

    cpo_name

    , count (overpayment_group_id) over (PARTITION BY overpayment_group_id) AS OCCURRENCES

    (SELECT review_date, id, NPP

    profile_name

    address

    skill

    assigned_cpo_id

    status_name

    domicile_id

    domicile_name

    overpayment_group_id

    cpo_name

    OF ftrx.opay_overpayments_vw

    where overpayment_group_id is not null)) a

    Join (select max (id) id, overpayment_group_id, NPP group opay_overpayments_vw by overpayment_group_id, ppn) b

    on a.id = b.id

    Let me know if my explanation is not clear enough.

    Thanks for reading.

    I thought that the function can be part of the problem. He called lots and made several requests by rank. Calls to PL/SQL in SQL a) require a context switch in the execution of the query (from SQL, PL/SQL) and (b) are completely opaque to the optimizer - it can not re - write to be faster than the procedure one call at a time. Instead of trying to re - write that it is faster, try to write it out of the query completely by turning it into a piece of SQL in the container view.

    Assuming that opay_overpayments.is_processed_yn is OPAY_PROCESSED_OVERPAYMENT(vw., changement ou «N», «Y» OVERPAYMENT_GROUP_ID) = 'N'

    in

    AND (vw. OVERPAYMENT_GROUP_ID or vw. OVERPAYMENT_GROUP_ID in

    (select OVERPAYMENT_GROUP_ID in the opay_overpayments where is_processed_yn = ' n and OVERPAYMENT_GROUP_ID is not null)

    )

    Having done this, you can probably also turn the query into an outer join between vw, the OPAY_OVERPAYMENT_ACTIONS Act ftrx.opay_overpayments_summary_vw and (select OVERPAYMENT_GROUP_ID in the opay_overpayments where is_processed_yn = ' only and OVERPAYMENT_GROUP_ID is not null) if the optimizer which has not already done so. That would minimize the amount of querying.

Maybe you are looking for

  • Satellite A200 - 28 P does not work, probably graphics card

    * Hello *.* Hello *. as the topic, laptop does not work, I think it's a graphics card defective (ATI Mobility™ Radeon® HD2600)I took out all the parts and I found a burned capacitor SMD 100nF/63V, I could be wrongbelow are pictures of the place where

  • is there a flashdrive secure adobe approved by apple?

    I've seen offers for the latest version of adobe flash player, but I don't know if apple believes that it is safe.  I did receive updates proposed for adbe flash player.

  • Trying to download Adobe Lightroom getting error code: 80040154

    I am trying to download Adobe Lightroom and I get a message to all first indicating that the file has been transferred to "Free Download Manager", then it is said that Free Download manager has been uninstalled, but I have no idea what it is! the err

  • Is this possible with photshop and 13mpx mobile phone camera?

    Is it possible with the phone mobile camera 13mpx and photshop make image look pro like that? TNX in advancehttp://s1.postimg.org/ta3np201r/MV5_BOTc0_ODk3_Mzg4_OF5_BMl5_Ban_Bn_Xk_Ft_ZTcw_Mz_Iy_Nzgz _ OQ.jpg

  • Windows XP frozen

    I tried to stop Windows XP.  I get errors of VMWare Tools.  While trying to shut down Windows, received the following message:"The request to turn off this virtual machine failed because the corresponding VMWare Tools script did not run successfully.