Query using views

Since the query is too big, I have removed the query from the post.
I would like to know whether using views in SQL queries degrade the performance of the queries?
When views are used in sql queries, the operation 'FILTER' is displayed in the explain plan, however the cost doesnt seem to be high. If the views can be replaced by the base tables, it is better to do so?
Edited by: user642116 on Nov 8, 2008 11:13 PM

user642116 wrote:
I have a main table called NATURAL_PERSON. There are several child tables based on this table, for e.g. PERSONAL_DETAILS, NATIONALITY_PERSON, CIVIL_STATUS etc. All these child tables have a foreign key NPN_ID which is joined with the ID of NATURAL_PERSON.
I need to obtain data from these child tables and present in them xmlformat.
A part of the query used is as below
SELECT npn.ID npn_id,
CONVERT(xmlelement("uwvb:NaturalPerson",
          XMLForest(LPAD(npn.nat_nummer,9,0) AS "uwvb:NatNr"),
          (XMLForest(LPAD(per.a_nummer, 10, 0) AS "uwvb:ANr"
          (SELECT XMLFOREST
                    (code_status AS "uwvb:ResidenceStatus")
                    FROM ebv_v_nep nep
                    WHERE npn_id = npn.ID
                    AND nep.nem_code = 'VBT'
                    AND nep.transactid =
                    (SELECT MAX (nep_i.transactid)
                         FROM ebv_v_nep nep_i
                         WHERE nep.npn_id = nep_i.npn_id
                         AND nep_i.nem_code = 'VBT'))
          entityelement),'WE8MSWIN1252', 'UTF8')
FROM ebv_v_npn npn, ebv_v_per per
WHERE npn.ID = per.npn_id
As seen in the above query, views have been defined for all the tables. For e.g. the view ebv_v_npn is based on NATURAL_PERSON, ebv_v_per is based on PERSONAL_DETAILS, ebv_v_nep is based on RESIDENCE STATUS. All these views are independent of each other and do not contain common tables in their definition.
The views can be replaced by the base tables as i dont see any advantage of using the views. I would like to know whether replacing the views with the base tables would also help to improve the performance.Replacing the views with the base tables might help, since not always Oracle is able to merge the views, so sometimes certain access paths are not available when working with views compared to accessing the base tables directly.
You can see this in the execution plan if there are separate lines called "VIEW". In this case a view wasn't merged.
The particular query that you've posted joins two views in the main query and (potentially) executes a scalar subquery that contains another correlated subquery for each row of the result set. "Potentially" due to the cunning "Filter optimization" feature of the Oracle runtime engine that basically attempts to cache the results of scalar subqueries to minimize the number of executions.
If the statement doesn't perform as expected you need to find out which of the two operations is the main contributor to the statement's runtime.
You can use DBMS_XPLAN.DISPLAY to find out what the FILTER operation you mentioned is actually performing (check the "Predicates Information" section below the plan output), and you can use SQL tracing to find out which row source generates how many rows. The following document explains how to enable SQL tracing and run the "tkprof" utility on the generated trace file: When your query takes too long ...
The correlated subquery of the scalar subquery that is used to determine the maximum "transactid" may be replaced with a version of the statement that uses an analytic function to avoid the second access to the view (note: untested):
SELECT npn.ID npn_id,
  CONVERT(xmlelement("uwvb:NaturalPerson",
          XMLForest(LPAD(npn.nat_nummer,9,0) AS "uwvb:NatNr"),
          (XMLForest(LPAD(per.a_nummer, 10, 0) AS "uwvb:ANr"
          (SELECT XMLFOREST
    (code_status AS "uwvb:ResidenceStatus")
    FROM (
      SELECT code_status,
      RANK() over (PARTITION BY npn_id ORDER BY transactid desc) as rnk
      FROM ebv_v_nep nep
      WHERE nep.npn_id = npn.ID
      AND nep.nem_code = 'VBT'
    where rnk = 1)
    entityelement),'WE8MSWIN1252', 'UTF8')
FROM ebv_v_npn npn, ebv_v_per per
WHERE npn.ID = per.npn_idRegards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/
Edited by: Randolf Geist on Nov 10, 2008 9:27 AM
Added the rewrite suggestion

Similar Messages

  • Need SQL query using View - Please help

    Hi,
    I have similar requirement like below.
    I have two tables DEPT and EMP and some departments may not have employees. I have created below view, which displays all DEPT records, even though there are no emplyees.
    CREATE OR REPLACE VIEW dept_emp_vw AS
    SELECT deptno, empid, 0 AS selected
    FROM dept d, emp e
    WHERE d.deptno = e.deptnno (+);
    Ex.
    DEPTNO         EMPID        SELECTED
    10 101 0
    10 102 0
    20 103 0
    30 103 0
    40 104 0
    50 <null> 0
    Application will pass "empid" to the view (for ex. empid = 103) and I want result like below.
    Ex.
    DEPTNO         EMPID        SELECTED
    10 101 0
    10 102 0
    20 103 1
    30 103 1
    40 104 0
    50 <null> 0
    Can you please let me know the query using "dept_emp_vw" view. We have Oracle 11g Release 2.
    Thanks a lot for the help.

    Not possible using normal SQL - as SQL is not a procedure language and does not support variable declaration and use (e.g. passing empid as a variable and using it both as a predicate and as a condition in the SQL projection).
    That said - SQL can be "+parameterised+". An approach that is ugly and contrary to the basic design and use of SQL. But it can support the (very weird) view definition of yours.
    E.g.
    SQL> create or replace procedure SetVariable( name varchar2, value varchar2 ) is
      2  begin
      3          DBMS_SESSION.set_context( 'MyVariables', name, value );
      4  end;
      5  /
    Procedure created.
    SQL>
    SQL>
    SQL> create or replace context MyVariables using SetVariable;
    Context created.
    SQL>
    SQL> create or replace view my_funky_weird_view as
      2  select
      3          e.empno,
      4          e.ename,
      5          e.job,
      6          case e.empno
      7                  when to_number(sys_context( 'MyVariables', 'empid' )) then
      8                          0
      9                  else
    10                          1
    11          end     as "SELECTED"
    12  from       emp e
    13  /
    View created.
    SQL>
    SQL> exec SetVariable( 'empid', 7499 )
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select * from session_context where namespace = 'MYVARIABLES';
    NAMESPACE            ATTRIBUTE            VALUE
    MYVARIABLES          EMPID                7499
    SQL>
    SQL> select * from my_funky_weird_view order by selected;
         EMPNO ENAME      JOB               SELECTED
          7499 ALLEN      SALESMAN                 0
          7521 WARD       SALESMAN                 1
          7566 JONES      MANAGER                  1
          7654 MARTIN     SALESMAN                 1
          7698 BLAKE      MANAGER                  1
          7934 MILLER     CLERK                    1
          7788 SCOTT      ANALYST                  1
          7839 KING       PRESIDENT                1
          7844 TURNER     SALESMAN                 1
          7876 ADAMS      CLERK                    1
          7900 JAMES      CLERK                    1
          7902 FORD       ANALYST                  1
          7369 SMITH      CLERK                    1
          7782 CLARK      MANAGER                  1
    14 rows selected.
    SQL>But I will N\OT recommend doing it this way. It is not natural SQL as PL/SQL is needed to "+inject+" name-value pairs into the context for the SQL view to use. It is ugly. It is not standard. It cannot scale. It is complex to use. Etc.
    Yes, there are instances when this approach is exactly what one needs - when for example dealing with a trusted context and using the contents for implementing a security layer. But in the above case - I would rather want to see the actual business requirement first, as I think you're barking up the wrong tree with the view solution you have imagined.

  • Slow query using view on cube

    I have created a cube using Analytic workspace manager (oracle 10G R2) which is to be used (via a view) in OBIEE.
    One of the dimensions (event_dim) is extremely sparse (it has been marked as sparse and is at the appropriate level in the cube's dimensional hierarchy).
    In general, when I query the cube (via the view) at high levels of aggregation, the performance is good, but when I query the cube at the lowest level of granulrity for the event_dim dimension, the performance is extremely poor (more than a minute to return).
    The problem seems to be that the view is returning data for all possible rows in the cube even if most of the measures are NA (i.e null since there is no data present).
    For example if I run a query against the cube with no filter on the measures I get around 20,000 rows returned - obviously this takes a while. If I then put a 'my_measure > 0' clause on the query I get 2 rows back (which is correct). However this still takes more than a minute to return - I assume that this is because the query is having to process the 20,000 rows to find the two that actually have data.
    Is there any way to control this - I never need to see the NA data so would like to be able to disable this in either the cube or the view - and hence improve performance.
    Note: I cannot use the compression option since I need to be able to override the default aggregation plan for certain dimension/measure combinations and it appears that compression and overriding the plan are incompatible (AWM gives the error "Default Aggregation Plan for Cube is required when creating cube with the Compression option").
    Thanks,
    Chris

    I have seen this in some examples/mails. I havent tried it out myself :)
    Try using a OLAP_CONDITION filter with an appropriate entry point option (1) on the OLAP_TABLE based query and achieve the goal of restricting output from query to value with meas > 0. This condition can be added as part of a specific query or as part of the OLAP_TABLE view definition (applicable to all queries). Hopefully this way there is no need to customize the limitmap variable to suit the cube implementation internal details like compression, partitioning, presummarization, global composite etc.
    NOTE1: The olap_condition entry point 1 pushes the measure based dimension filter within the cube before fetching results from cube. Hopefully this will help speed up the retrieval of results. This should work well if we want the restriction to apply across 1 dimension.. Time or Product alone.. only 1 olap_condition is sufficient.
    SELECT ...
    FROM <olap_table_based_view>
    where ...
    and olap_condition(olap_calc, ' limit time KEEP sales_sales > 0', 1)=1
    --and olap_condition(olap_calc, ' limit time KEEP any(sales_sales, product) > 0', 1)=1
    NOTE2:
    For cases where both time and product (and more dimensions) need to be restricted then we can use 2 olap_conditions to restrict data to set of time and products where some data exists but you could still end up with a specific row (cross combination of product and time) with zero value. You may want to bolster the pre-fetch filtering by olap_condition via a regular sql filter referencing the external measure column (and sales_view_col >0) which is applied on to the results after it is fetched from the cube.
    E.g:
    SELECT ...
    FROM <olap_table_based_view>
    where ...
    and olap_condition(olap_calc, ' limit product KEEP any(sales_sales, time) > 0', 1)=1
    and olap_condition(olap_calc, ' limit time KEEP any(sales_sales, product) > 0', 1)=1
    and sales_view_col >0
    HTH
    Shankar

  • Performance of query using view - what is happening here

    Hi,
    I can't explain the difference in performance between two queeries.
    For a datawarehouse I have 3 tables from 3 different sources, named source1, source2 and
    source3 they all have the identical columns:
    client_key
    ,client_revenue
    source1 has 90.000.000 rows, source2 1.000.000 rows and source3 50.000 rows
    I also made a view say, all_clients which is the union of the 3 tables plus a constant column called 'source'
    which corresponds to the table_name.
    If I run a query which shows the number of records it takes 15-20 minutes:
    select source,count(*)
    from all_clients
    group by source.
    If i run the following query it takes about 5 minutes!
    select 'source1',count(*)
    from source1
    union
    select 'source2',count(*)
    from source2
    union
    select 'source3',count(*)
    from source3.
    What makes the difference?

    Hmmm... Interesting. In my small example things seem pretty similar. Have you done the explain plans?
    An observation is that you are using a UNION rather than a UNION ALL which would be better as you may be incurring an unnecessary SORT UNIQUE.
    create table tab1 as(select object_id, object_type from all_objects);
    create table tab2 as(select object_id, object_type from all_objects);
    create table tab3 as(select object_id, object_type from all_objects);
    analyze table tab1 estimate statistics;
    analyze table tab2 estimate statistics;
    analyze table tab3 estimate statistics;
    create view v_tab123 as(select 'source1' source,count(*) cnt
    from tab1
    union
    select 'source2',count(*)
    from tab2
    union
    select 'source3',count(*)
    from tab3);
    select 'source1' source,count(*) cnt
    from tab1
    union
    select 'source2',count(*)
    from tab2
    union
    select 'source3',count(*)
    from tab3;
    Operation     Object Name     Rows     Bytes     Cost     TQ     In/Out     PStart     PStop
    SELECT STATEMENT Hint=CHOOSE          3           180                     
    SORT UNIQUE          3           180                     
    UNION-ALL                                        
    SORT AGGREGATE          1           60                     
    TABLE ACCESS FULL     TAB1     38 K          10                     
    SORT AGGREGATE          1           60                     
    TABLE ACCESS FULL     TAB2     38 K          10                     
    SORT AGGREGATE          1           60                     
    TABLE ACCESS FULL     TAB3     38 K          10                     
    -- Union
    select source, cnt from(
    select 'source1' source,count(*) cnt
    from tab1
    union
    select 'source2',count(*)
    from tab2
    union
    select 'source3',count(*)
    from tab3)
    Operation     Object Name     Rows     Bytes     Cost     TQ     In/Out     PStart     PStop
    SELECT STATEMENT Hint=CHOOSE          3           180                     
    VIEW          3      54      180                     
    SORT UNIQUE          3           180                     
    UNION-ALL                                        
    SORT AGGREGATE          1           60                     
    TABLE ACCESS FULL     TAB1     38 K          10                     
    SORT AGGREGATE          1           60                     
    TABLE ACCESS FULL     TAB2     38 K          10                     
    SORT AGGREGATE          1           60                     
    TABLE ACCESS FULL     TAB3     38 K          10                     
    -- Union ALL
    select source, cnt from(
    select 'source1' source,count(*) cnt
    from tab1
    union ALL
    select 'source2',count(*)
    from tab2
    union ALL
    select 'source3',count(*)
    from tab3)
    Operation     Object Name     Rows     Bytes     Cost     TQ     In/Out     PStart     PStop
    SELECT STATEMENT Hint=CHOOSE          3           180                     
    VIEW          3      54      180                     
    SORT UNIQUE          3           180      <<<<============== Unnecessary           
    UNION-ALL                                        
    SORT AGGREGATE          1           60                     
    TABLE ACCESS FULL     TAB1     38 K          10                     
    SORT AGGREGATE          1           60                     
    TABLE ACCESS FULL     TAB2     38 K          10                     
    SORT AGGREGATE          1           60                     
    TABLE ACCESS FULL     TAB3     38 K          10                     
    analyze table tab1 delete statistics;
    analyze table tab2 delete statistics;
    analyze table tab3 delete statistics;
    Now with RBO - the SORT UNIQUE goes away for the above query.
    Operation     Object Name     Rows     Bytes     Cost     TQ     In/Out     PStart     PStop
    SELECT STATEMENT Hint=CHOOSE                                        
    VIEW                                        
    UNION-ALL                                        
    SORT AGGREGATE                                        
    TABLE ACCESS FULL     TAB1                                   
    SORT AGGREGATE                                        
    TABLE ACCESS FULL     TAB2                                   
    SORT AGGREGATE                                        
    TABLE ACCESS FULL     TAB3                                   

  • HELP! Query Using View to denormalize data

    Help!!!
    Below are two logical records of data that have been denormalized so that each column is represented as a different record in the database
    RECORD NUMBER, COL POSITION, VALUE
    1, 1, John
    1, 2, Doe
    1, 3, 123 Nowhere Lake
    1, 4, Tallahassee
    1, 5, FL
    2, 1, Mary
    2, 2, Jane
    2, 3, 21 Shelby Lane
    2, 4, Indianapolis
    2, 5, IN
    I need to write a view to return the data values in this format:
    John, Doe, 123 Nowhere Lake, Tallahassee, FL
    Mary, Jane, 21 Shelby Lane, Indianapolis, IN
    I REALLY need this as soon as possible! Someone PLEASE come to my rescue!!!

    Assuming that the other table has one record per record_num in the first table, then you could do something like:
    SQL> SELECT * FROM t1;
    RECORD_NUM DATE_COL
             1 17-MAR-05
             2 16-MAR-05
    SQL> SELECT a.record_num, col1, col2, col3, col4, col5, t1.date_col
      2  FROM (SELECT record_num,
      3               MAX(DECODE(col_position, 1, value)) Col1,
      4               MAX(DECODE(col_position, 2, value)) Col2,
      5               MAX(DECODE(col_position, 3, value)) Col3,
      6               MAX(DECODE(col_position, 4, value)) Col4,
      7               MAX(DECODE(col_position, 5, value)) Col5
      8        FROM t
      9        GROUP BY record_num) a, t1
    10  WHERE a.record_num = t1.record_num;
    RECORD_NUM COL1  COL2  COL3              COL4            COL5  DATE_COL
             1 John  Doe   123 Nowhere Lake  Tallahassee     FL    17-MAR-05
             2 Mary  Jane  21 Shelby Lane    Indianapolis    IN    16-MAR-05If your second table is structured like the first table then something more like:
    SELECT record_num,
           MAX(DECODE(source,'Tab1',DECODE(col_position, 1, value))) Col1,
           MAX(DECODE(source,'Tab1',DECODE(col_position, 2, value))) Col2,
           MAX(DECODE(source,'Tab1',DECODE(col_position, 3, value))) Col3,
           MAX(DECODE(source,'Tab1',DECODE(col_position, 4, value))) Col4,
           MAX(DECODE(source,'Tab1',DECODE(col_position, 5, value))) Col5,
           MAX(DECODE(source,'Tab2',DECODE(col_position, 1, value))) T2_Col1,
           MAX(DECODE(source,'Tab2',DECODE(col_position, 2, value))) T2_Col2
    FROM (SELECT 'Tab1' source, record_num, col_position, value
          FROM t
          UNION ALL
          SELECT 'Tab2' source, record_num, col_position, value
          FROM t1)
    GROUP BY record_numBy the way, I can't say I am enamoured of your data model.
    John

  • SQL query or view used internally by Discoverer Open Workbook from Database

    Hi Experts,
    I am involved in developing a web application wherein I have to display the 'All Workbooks' similiar functionality in the 'Open Workbook from Database' dialog box of Discoverer. Can anybody provide me with the background query or view that Discoverer uses to retrieve this data for workbook listing? Please let me know if my question is confusing and requires more details.
    Thanks
    Thomas

    Hi,
    If you just need the list of workbooks then you need to use the EUL_DOCUMENT table:
    SELECT u.User_Name          Owner_Name
    *,Doc.Doc_Name Workbook_Name*
    *,Doc.Doc_Updated_Date Last_Update_Date*
    FROM   Eul_Us.Eul5_Documents Doc
    *,Eul_Us.Eul5_Eul_Users Own_Usr*
    *,Fnd_User u*
    WHERE  Own_Usr.Eu_Id = Doc.Doc_Eu_Id AND
    To_Char(u.User_Id(+)) = Substr(Own_Usr.Eu_Username
    *,2*
    *,10);*
    If you want the exact same list then you need to do the above along with the sharing :
    SELECT DISTINCT
    case when instr(disco_docs.doc_created_by,'#')=0 then disco_docs.doc_created_by
    when instr(disco_docs.doc_created_by,'#')>0 and instr(disco_docs.doc_created_by,'#',2)=0 then (select fu.user_name from fnd_user fu where fu.user_id=substr(disco_docs.doc_created_by,2,5))
    else NULL
    end "Workbook Owner/Creator",
    disco_docs.doc_name "Workbook Name",
    disco_docs.Doc_Updated_Date  "Last Update Date",
    case when instr(disco_users.eu_username,'#')=0 then disco_users.eu_username
    when instr(disco_users.eu_username,'#')>0 and instr(disco_users.eu_username,'#',2)=0 then (select fu.user_name from fnd_user fu where fu.user_id=substr(disco_users.eu_username,2,5))
    else (select resp.responsibility_name from fnd_responsibility_tl resp where resp.responsibility_id=substr(disco_users.eu_username,2,5))
    end as "Shared Name / Responsibility"
    FROM
    eul_us.eul5_documents disco_docs,
    eul_us.eul5_access_privs disco_shares,
    eul_us.eul5_eul_users disco_users
    WHERE
    disco_docs.doc_id = disco_shares.gd_doc_id (+)
    and disco_users.eu_username(+) NOT IN ('EUL5', 'PUBLIC')
    AND disco_users.eu_id(+) = disco_shares.ap_eu_id;
    * Change the EUL_US to your discoverer schema...
    Then you will need to compare the current user with the sharing list or creator
    Good luck
    Tamir

  • Problems in creation of workbook using Change query local view.

    Hi Experts,
    I have created a Multiprovider by using union of two infocubes and created a Query based on Multiprovider.  I want to restrict one infocube in Change Query local view for creating new workbooks.  In Query global view we drag and drop the Infocube under Filters, but in the Query local view Filter panel is in disable mode. (My requirement is to create the workbooks using change query local view only)
    How can I restrict the one Infocube values in the workbooks by using Change query local view? 
    Thanks in advance.
    Venkat.

    Hi Venkat Prasad
    As you told that the query is on multi provider and the view is not allowing to declare/define filter value
    Just drag the infoprovider info object avilable under packet dimension to rows and right click on it restrict by selecting the name of the info provider when u right click it will show you the option of restrict once u click on it,it will takes to u a pop up where you can able to see the name of info providers and you specify according to it and finally in the display of results if you dont want to to display the info provider name then just right click on the 0infoprovider object under rows go to properties then choose hide option under display.
    Hope its clear a little..!
    Thanks
    K M R
    **Assigning points is the only way of saying thanks in SDN***
    >
    venkata prasad wrote:
    > Hi K M R,
    >
    > Thanks for ur quick response.  Most of the Infoobjects are common for both infocubes. I didn't understand this sentense "retrict the value with the infoprovider which values you are trying to view".
    > Please explian elaborately how to restrict the values speicfic to infoprovider under rows.

  • Modify query used in Materialized View

    Are there any ways to modify the query used in materialized view without dropping the materialized view. I dont think alter materialized view has such an option.
    Please provider me your suggestions.

    you have to give "ENABLE QUERY REWRITE" option then u can change your query

  • BOXI3.0 Universe Design using view or query in SQL

    Hi. Alias here.
    I would like to know what are the effect to the BOXI3.0 or SQL performance if:
    1. We are using view or query in creating the universe?
    2. Is it the correct way of creating the universe only from tables?
    3. If need to do combination between tables and views?
    Hope you all can reply to this matter.
    Regards,
    Alias

    Hi Alias,
    Designer has the capability to import tables and views you cna use in the design of the universe. Furthermore, you can also create a derived table in the universe - in simple terms it is much like a view, but the code is in the universe availble to the universe designer.
    With all this available to you, it is pretty much up to you how you want to tackle the design. I would say first prise is using the physical tables in the databse, then move to using a view and if there are certain restrictions on the designer, use the derived tables.
    Remeber this, at the end of the day, any SQL code generated or used is passed down to the database to be processed, may it be the query from the universe directly on the tables or by means of the views or derived tables - the database server will need to crunch through it all - and this is what will determine your performance.
    Regards
    Jacques

  • When to go for generic extraction using view and infoset query?

    Hi,
                        Can anyone clarify me when we should go for generic extraction using view and when we should go for generic extraction using infoset query....
    Also what is the difference between view and infoset?
    I tried but could not find out....
    Regards,
    Kalyani.

    Hi Kalyani,
    We normally go for View or infoset when the data to be fetched in BW is distributed in different tables in SAP R/3.
    Had the data been available in one table we can easily build our datasource on that table but if there are more tables then its not possible to do it without Views or Infosets. You can use Function Modules to build your datasource in case it involves complex logic to figure out the data from various tables.
    Depending upon the table relationships we create view and include various fields from these tables in that view. Same is with the Infosets, you can have more flexible options like Outer Join, left outer Join etc.
    Regards,
    Pratap Sone

  • Check query used to create system views

    Hi Group,
    I would like to know if there is any way to check the TSQL query used by SQL to create system views. I know for user created views, you can open it in Designer or script the view. Use SQL 2012 as an example when selelcting the top 1000 records no underlyng
    query is visible.
    Thanks and Regards,

    You can see most of them using sys.all_objects and sys.system_sql_modules.  For example
    select o.name, m.definition
    from sys.system_sql_modules m
    inner join sys.all_objects o on m.object_id = o.object_id
    where o.name = 'dm_exec_requests'
    Be very careful that you don't ever run the code that creates the view.  There are additional tricks behind the scene that give some system views special actions.  So if you run the code, your code might not work the same way as the original system
    view.
    Also, anything which is not documented can be changed by Microsoft at any time.
    Tom

  • (view hint or Query  writing method) using views in Select Query

    Need Assistance,
    Hi all,
    My database having many views. while i am joining the views in a select query increase the cost of the querys due to the complex joins in the conditions.
    While checking the select query with views individualy taking less cost.
    Does any hint or query writing method is availabe to avoid the merging of the execution plan of the views?
    I have browsed many related to the mentioned issues,couldn't found any thing that helps me.
    Please help me on this issue,it will be very much helpfull for me.
    Thanks,
    Senthur

    Please read the two threads linked to in the FAQ: {message:id=9360003} and post the relevant details they request, so that people can help you better with your issue.
    We cannot help if you just say "my query is slow what do I do to fix it" as we cannot see your queries, your data, or any other information we would need to help. If the answer was that simple, it would be built into oracle so that the optimiser would fix it for you.

  • Query to view the support group of a generated ticket in the Database, not the Data Warehouse

    Hi,
    I need a query to view the support group of a generated ticket, but the query must be useful in the only Database (I don't know what happened in the DW, could be a issue).
    Please help me,
    Greetings! 

    it's "possible", in the same way that low temperature fusion and space elevators are "possible". There's nothing conclusively ruling it out, but not something you want to attempt on your own under a time constraint. 
    The "Active" ServiceManager database is a 5th or 6th normal form dynamic software defined snowflake schema representitive object database. Updating the database directly is strictly unsupported, and
    Travis has discouraged people from even trying to read from it. a college of mine does service manager and operations manager databases at a 400+ level full time, and after 2+ years of doing it, he
    almost understands the operational database. it's WELL beyond me, and I do Service Manager basically full time. 
    That being said, if you are brave and only looking for some basic data, you might be able to tease some things out with the SQL management studio and a good grasp of SQL syntax.
     for a production environment, you're much better off fixing the DW. 

  • Is it possible the query in view object is dynamic?

    Is it possible the query in view object is dynamic?
    Generally, make the column list dynamic.
    I think this is related to whether view object can be assembled at runtime based on a dynamic cursor in a procedure?
    I ask this because I would like to know how we can use OA framework to simulate crosstab workbook in Discoverer?
    Anybody has some clues, please advise.
    Thanks.

    Hi Shay,
    Let me tell you briefly... I am sending input as customerId,customerNumber,CustomerName to the web service, if the record is available i am getting the response and i am displaying those records on page as a table. Now when i click a row i need to populate another table with all sale orders of that customer. From webservice datacontrol i have only customer object, I dont have Sales Order Object. For this i need master detail relation. In this case how to proceed. Thats why i am thinking to create a vO and EO object for sales orders table and i want to create view link for this sales order and customers. As i don't have customer VO and EO object to create view link.

  • How to build sql query for view object at run time

    Hi,
    I have a LOV on my form that is created from a view object.
    View object is read-only and is created from a SQL query.
    SQL query consists of few input parameters and table joins.
    My scenario is such that if input parameters are passed, i have to join extra tables, otherwise, only one table can fetch the results I need.
    Can anyone please suggest, how I can solve this? I want to build the query for view object at run time based on the values passed to input parameters.
    Thanks
    Srikanth Addanki

    As I understand you want to change the query at run time.
    If this is what you want, you can use setQuery Method then use executeQuery.
    http://download.oracle.com/docs/cd/B14099_19/web.1012/b14022/oracle/jbo/server/ViewObjectImpl.html#setQuery_java_lang_String_

Maybe you are looking for

  • How can i make a Web application with listboxes as the column value

    Hi, I have two tables,one is employeees the other is devices.(Devices is the table for department notebooks).I want to implement an applicatiion for employees in order for them to book department laptops,so everyone will know which devices are in use

  • How to create and configure a user for MaxDB monitoring

    Good Morning, Is it possible to create a user in MaxDB which can only, check DB State, Data Space (Used, Available, Etc) and Log Space? If possible, how to create it and the respective authorizations? The reason i'm asking you that is because i need

  • Cover Flow in the wrong order

    I have had my Ipod Touch for about a week now, and I have about 1000 songs on there. I love using 'Cover Flow' to browse through my music, but whenever I do, the Albums are all in the wrong order. I know this isn't a major thing, but I really like to

  • Intrastat Arrivals report with a wrong format

    Hello gurus, I have problems with producing the Intrastat Arrivals part for Belgium in the correct format. The file should be SDV format (semi-colon separated). I run ENPA and choose the report relevant for BE. Then I run VE15 to get the file, but it

  • Advanced TDMS, Set Channel Information

    Hello, I have a problem with scaling in and TDMS File. I´ll try to explain what i want to do. I work on a system that streams data from 2 PXIe 5122 via peer to peer streaming to 2 NI 7962R FPGA FlexRIO cards. After that I want to stream my measuremen