Problem of interactive report performance through data link

Hi gurus,

I have an interactive report that retrieves values from two joined tables, all two places on the same remote database. It takes 45 seconds to complete (refresh) a page after the issuance of a search. If I take the actual selection that is generated by the apex (the one with count (*) ()...) and run it from sql environment, it takes 1 or 2 seconds. What on Earth consumes the rest time and how to speed this up? I would like to awoid, create and maintain local if possible materialized views.

Concerning
SAMO

Hello

APEX should normally return the full result for the use of paging (where you put something in the sense to see the x - y of z), it changes, or the maximum number of lines can greatly affect performance.

The site led indicator would need to refer in the name of the view, but can be a little finicky with that sort of thing. The suspicion of materialization only works for requests under weighted (in a ' WITH bla AS (SELECT / * + MATERIALIZE * / * FROM etc. etc.)). They tend to materialize in any case and its better not to use advice like this for production code unless there is absolutely no other choice, but just sub factoring without advice can often have a profound effect on performance. For example

WITH a AS
(
 SELECT c1,
        c2,
        c3,
        c4,
        c5
 FROM schema1.view1)
, b AS
(
 SELECT c1,
        c2,
        c3
 FROM schema1.view2)
SELECT *
FROM a, b
WHERE a.c5 = b.c3

Can produce a different plan or even just sub factoring one of the outside tables can have an effect.

You need to try things here and experience and keep watching the execution plans. You must also replace fetch of row of toads to be all 9 to get a real idea of the performance.

Let me know how you go.

See you soon

Ben
http://www.munkyben.WordPress.com
Don't forget to mark the answers useful or correct ;)

Published by: Munky on September 29, 2009 13:41

Tags: Database

Similar Questions

  • Interactive report performance with conditional link

    Apex 3.2

    I have an interactive report.

    The underlying sql return 127000 lines

    The sql is

    Select

    LDE.ods_system,

    LDE.ldekey,

    Msg.sendersystem,

    Msg. MessageType,

    Msg. MessageVersion,

    Msg.msgseqnumber,

    Msg. AlternateKey,

    Msg.crudmarker,

    Msg.clrbookdate,

    Msg.clrbookresult,

    lower ('udf_' | MSG button.) MessageType),

    LDE.ldekey |'. ' | Msg. AlternateKey |'. ' | Msg.msgseqnumber udm_key

    Of

    clr_esbmessageheader msg,

    clr_adm_systemmessage SMA,

    lde udm_lde

    where

    ADM.ldeid = lde.ldeid and

    Msg.sendersystem = adm.system and

    Msg. MessageType = adm.messagetype and

    Msg. MessageVersion = adm.messageversion and

    Msg.receiversystem = "SCIPS.

    msg.clrbookdate desc order

    This report takes a second to display.

    I need to add a conditional link to another page, so I used

    case

    When lower ('udf_' | msg.) MessageType) = "udf_distreceipt" then

    "' < a class ="type"href =" "|" apex_util.prepare_url ('f? p ='|: APP_ID |) » : 52 :'|| : APP_SESSION |': ' | : D EBUG |': RIR' | ': I R_MSG_KEY, P52_PG :'|| LDE.ldekey |'. ' | Msg. AlternateKey |'. ' || Msg.msgseqnumber | «, » || 50, null, 'SESSION') | «"title ="Go α report udf_distreceipt"> udf_distreceipt < /a > '»»

    Another 'no link' don't end table_link

    The sql seems to be ok, because the report was accepted, but by selecting the new column and save the report back for always (2 min)

    Now, the report takes more than 2 minutes to run and I still need to add more conditions.

    I coded the link incorrectly?

    Gus

    Well either force them to filter everything first or actually withdraw the appeal prepare_url of your sql. Can you not just use the link of apex column feature? All your links seem to differ in is in the display text for the anchor and not the actual url. If your link is perhaps not as accurate, but at least going to session state protection and be fast and everything will be pretty standard. You could delete SSP of course, but who are better than a more generic link text? The call is of course to you.

  • Sort the results of interactive report in no data found message

    Hello

    I have an interactive report that returns results based on the: bind variable QUERY - I have a list of navigation on the side where all the elements to link to the current page with different values of request. The IR works fine until I try to sort the columns by clicking on the heading and selecting increasing / decreasing, how it returns no data available.

    It starts to work again if I change the last line of GOLD: REQUEST IS NOT NULL but this breaks the functionality of the report, I would like to return only selected articles or all if no query variable is present. I'm guessing that sort sets: ASK something temporarily and divides. My query is below, any ideas?
    SELECT   id,
             job_number,
             appt_start,
             domain,
             pwa,
             status,
             tstamp_created 
      FROM   fail_jobs 
      WHERE  (status = 'NEW' AND userid_created != 'SYSTEM' AND :REQUEST = 'ARD') 
         OR  (status = 'ATR' AND :REQUEST = 'ATR')
         OR  (status IN ('ERR','REV') AND :REQUEST = 'REV')
         OR  (status = 'COM' AND :REQUEST = 'COM')
         OR  (status IN ('PCD','PCA') AND :REQUEST = 'PCD')
         OR  :REQUEST IS NULL
    Thank you

    There are problems with interactive reports referencing known: DEMAND value, probably due to an internal logic that manages also simultaneously - potentially cause a malfunction or blockages.

    A workaround that I learned is to create a calculation to assign: APPLICATION to a temporary element (a PXX_REQUEST, for example) and reference it in the query, instead of: ASK. This has worked well for me in my experience.

    I would like to know if this helps - pls sign the thread as 'Useful' or 'Correct' if so, so more people can benefit.

    TKS,
    Kléber

  • Problem with interactive report

    Hi all

    I use Apex 4.2

    I have an interactive in which I activated the filtering and sorting.

    When I click on one of the column in the interactive report, saying: "LAST NAME", it shows me the filtering and sorting options drop down.

    The poster also available name drop extracted from the query, but it shows me some range of name pronounce A - C only.

    I have family with starting with another letter also names, but those names are not displayed.

    For some columns displays the values of A to E, but not the full list.

    How to display the entire list in this fall down.

    Kind regards

    Jean-Louis Patel.

    Hi Alice,.

    Because of interactive report performance, it loads only a few filters.

    If you change the column definition for the column, under set the Filter Type of column to one of the other options like 'User defined list of values to exact match filter' from the list of values.  You can then specify the query used to generate this list.  You could use something like what listed below to grab the first 20000 records.

    Select *.

    from (select name

    WCP

    em order by name)

    where rownum<=>

    But don't forget, it will always affect your performance of interactive report page.

    Or alternatively, you can use this link:

    http://tpetrus.blogspot.in/2012/05/interactive-report-filtering-in-apex.html

    -Sunil Bhatia

  • Interactive report returns misleading data because of the limit ROWNUM

    Hi, we have relied on the internal decision-making interactive reports widespread in our society, and they have been very popular. However, a user has found an inconsistency of data when sorting to a report because the ROWNUM limit: APXWS_MAX_ROW_CNT is applied before the user requested the ORDER BY clause. We run Apex version 3.2.0.00.27 on a 10.2.0.4 database.

    Request quotes from our application IR returns citing custom and the number of lines by default is 100 (and is editable by the user). The user wants to see the most recent citations, so he chose the column heading "Date of creation" and simply applied a descending filter. The last quote returned was dated last week. However, if he has applied an additional filter of "date of creation last week", he sees today date and for most of the current quotation lines.

    When I ran on its IR application debugging, I see that the ROWNUM limit is applied first, followed in ORDER BY. This means that the database retrieves the x first lines that match the provided parameters and then orders the result set. However, this isn't what the user meant, he wanted the first lines of an ordered set.

    This is the result of the query to debug (deleted community because it is long):
    select 
           "QUOTE_NUMBER",
           "CUSTOMER",
           "CUST_CONTACT",
           "QUOTE_STATUS",
           "TOTAL_PRICE",
           "TOTAL_WEIGHT",
           "WHSE",
           "SHIP_DATE",
           "PO_NUMBER",
           "ORACLE_REFERENCE",
           "INSIDE_SALESREP",
           "OUTSIDE_SALESREP",
           "CREATION_DATE",
           "ID",
           "ORA_CUST_ID",
           "CUST_CONTACT_ID",
           count(*) over () as apxws_row_cnt
     from (
    select  *  from (
    SELECT 
      kh.id,
      kh.ora_cust_id,
      kh.quote_number quote_number ,
      kh.cust_contact_id,
      k2_customers_pkg.get_contact(cust_contact_id) cust_contact ,
      k2_customers_pkg.get_cust_name(kh.ora_cust_id)customer,
      k2_customers_pkg.get_cust_number(ora_cust_id)
    
     ( ......... more sql goes here )
    
    AND k2_customers_pkg.get_outside_salesrep_number(kh.ora_site_id)||'%' LIKE :P64_OUTSIDE_SALES||'%'
    AND kh.whse_code like :P64_WAREHOUSES||'%'
    AND ((1=
        CASE WHEN :P64_ITEM_ID IS NULL THEN
            1
        ELSE
            (SELECT 1
               FROM k2_quote_lines kl
               JOIN k2_ingredients ki
                 ON ki.quote_line_id=kl.id
              WHERE (1=1
                AND kh.id=kl.quote_id
                AND ki.ora_item_id=:P64_ITEM_ID AND ROWNUM=1))
        END)
        OR 1=(
            SELECT 1 FROM k2_quote_lines kl WHERE kl.quote_id=kh.id AND kl.part_id=:P64_ITEM_ID AND ROWNUM=1
        ))
    )  r
    ) r where rownum <= to_number(:APXWS_MAX_ROW_CNT) 
     order by "CREATION_DATE" DESC,"QUOTE_NUMBER" DESC
    However, what the user must have the ORDER BY applied first, then the limit. I realize performance can be affected, but users are now alarmed that they cannot trust these reports. I'm tempted to connect a SR with Oracle on it.

    Any ideas on that? What is this problem fixed in 4.0?

    Thank you, Moritz Wolf

    Hi Wolf,

    I don't think that the problem is with the number of rows displayed. I think that it is a function of the attribute of the ratio "number of lines". And as assistance at the level of the elements of this attribute indicates "defines the maximum number of rows in the query. Note that this attribute impact on performance. Get fewer lines can improve performance and get thousands of lines can adversely affect performance. »

    You can set the maximum number of rows to an artificially high - greater number that we'll never be your total number of lines. But this does not alter the fact that the ORDER BY still apply on the outer part of your query.

    Joel

  • Call the procedure to set the context before interactive report refreshes the data

    Hi guys,.

    I have a question mind an interactive report which takes the data in a view.

    The problem is that whenever I take the data from the database I need to define a context (user name and password) before running the query so the view will be taken into account the context and return only the lines that I have access.

    Everything works fine when I'm first loading of the page: I have first to define the context, then load all the data I need on the page, including the IR. But when I try to apply IR filters, or even don't go to the next page no data is returned. I believe this happens because the context is not defined before the execution of the query to load the data and I don't seem to find a way to put it.

    I tried to add a dynamic action on some events on IR (change, clicking, etc.) that executes the procedure to set the context, but without success - even if the event is raised, the report still doesn't return any data.

    Can someone help me with this issue please?

    Florin

    Use the attributes of application security Code PL/SQL of the initialization/cleanup of the database Session to do this: http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/bldr_attr.htm#HTMDB28929

  • edit interactive report based on APP_USER link conditional

    I have a users table with standard information, including a user_id column which is what is used by my access control page to connect. I have a screen of user management with an interactive report I want everyone to see all users, but I want only the link modify to display the line that represents the user who is logged on. I know there is a conditional parameter on the link change, and I tried to develop in exp1 = exp2, with & APP_USER. exp1 and exp2 user_id, but who do not seem to work. Any other ideas, or I'm doing something wrong with the way I tried to make it work?

    HI -.

    It really bothers me, this forum has a problem with the code examples, so for a while at least I posted quick example on Google:

    [Conditional column | http://docs.google.com/Doc?id=dd2tkvv6_212dbzw2ftq]

    Not to complicate too much, but if you want without empty column except a line, you could of course apply this trick to the column that contains actually the user name in your table... in other words, the user can right click on their name to go to the Edit screen, but any other name user, but they would not be a hyperlink. But it is as they say an exercise for the reader :)

    Good luck.

  • Interactive report with filter Date

    Hi out there,.

    I've created an interactive report that contains a date column. Default filtering options only work very well. But my users need to filter the data contained in the report, for example if a line contains 21.06.2000 they want to see the value in this column to date filter list and not the default predefined (five years, last day and so on).

    I already tried to specify the date string and made a select... wanted my users to_char (date_column, 'dd.mm.yyyy') who beat the sorting, but gave me the filter options. Specifying the date as yyyy.mm.dd is not an option for my users.

    Is it possible to get a filter that displays the 'real' data and maintains the right sort order?

    Best regards and thank you
    Markus

    Replace with a greater - than sign and which functions as expected maceyah.

    Make sure that the screen - with respect to the column is 'delete the HTML code... '. ».

    Kind regards
    Malcolm.

  • Problems of interactive report PL/SQL - current function or Collections

    Hello

    I have a report where I want either to limit the return by date or return the set. PL/SQL has not worked in the interactive report (is it available in 3.2?) then my second idea (2 reports, one for each option) didn't work as you can have more than one IR on a page. Looking here I found people of other leaders here for collections and here for common functions.

    OK I finally got the thing of collections (did not know that "function_returning_query" would be replaced by your code) but I'm not sure, it can be used in my situation? I want it to be dependent on a LOV on the page with my code predicted as:
    DECLARE
    q VARCHAR2(30000);
    BEGIN
    q := 'select UPD_ID, PROJECT,DATABASE,REF,DESCRIP,STATUS,PERSON,
    TO_CHAR(INS_DATE, ''HH24:MI DD-MON-YY'') AS INS_DATE
    from TBL_ENV_LOG';
    IF :P5_DAYS != 1337 THEN 
    q := q || ' where TBL_ENV_LOG.INS_DATE >= TO_TIMESTAMP(SYSDATE - :P5_DAYS)';
    END IF;
    q := q || ' order by TBL_ENV_LOG.INS_DATE desc';
    return(q);
    END;
    If the value of: P5_DAYS would need to go somehow, can it be passed as a parameter?
    Is there another way to do this? A lot of hidden fields is boring :/

    Edit: I've used a CASE statement for a column before, could I use it for all queries?

    Mike

    Published by: Gerd on October 14, 2009 10:45

    This should however?

    SELECT   UPD_ID,
             PROJECT,
             DATABASE,
             REF,
             DESCRIP,
             STATUS,
             PERSON,
             TO_CHAR (INS_DATE, 'HH24:MI DD-MON-YY') AS INS_DATE
    FROM   "#OWNER#"."TBL_ENV_LOG"
    WHERE   (TBL_ENV_LOG.INS_DATE >= TO_TIMESTAMP (SYSDATE - :P5_RAD)
             AND:P5_RAD != 1337)
    OR (:P5_RAD = 1337)
    ORDER BY   TBL_ENV_LOG.INS_DATE DESC;
    

    (I have not checked this very well, but you get the idea)

    See you soon

    Ben

  • The reports generated interactive visuals: why some data link is unavailable?

    I want to enjoy the interactive generated visual report available in the electronic dashboard and share with the rest of my team, but some connection information is not displayed. Total number of clicks and the percentage of clicks appear in sections of header and footer. But anywhere in the body of the email where there is a link, the report indicates "0 clicks, 0.00% of total clicks." I pulled a report of broken link, so I can prove that the links in the email are, in fact, have clicked on, but I am at a loss as to why the data is not displayed in the Visual click per report.

    We use for a follow-up query strings, and all the links in our emails are redirect links... with the Eloqua coding. Could one of these have an impact on the reports?  (I'm on E9)

    Does anyone else have this problem? Your help and your insight is greatly appreciated.

    Thank you

    Julia Teske

    Specialist in marketing automation

    [email protected]

    Hi Julia,

    If you insert dynamic values in the URL (for example, the merger in e-mail as a query string) and then the Visual click by report will not work. Visual click compared scans each link in the email and then trys to match the history of clickstream data against these URLS. If it finds a match, it fills the click Visual. If he can't do it for some reason (for example the link in the email www.google.com?email=Email_Address and the final URL sent to contact after mergers is [email protected] ) then unfortunately, he can't fill these data in the report.

    The clicks link email fault report is the best choice in these situations, because it is not affected by the above question (as it is just a list of URLS from track data, it does validate not against the content of the email in Eloqua).

  • Problem with the report as a button link

    Apex 3.2

    I had a relationship with a column of link to another page.

    The user wanted a button instead of one of the standard icons, so I change the link text to

    < button type = "button" > Clean < / button >

    If I use firefox, then this link works very well, but in IE, nothing happens when I click on the button.

    Gus

    Hello

    Perhaps this example help

    https://Apex.Oracle.com/pls/Apex/f?p=39006:35

    I created request report

    SELECT empno,
      ename,
      job,
      APEX_UTIL.PREPARE_URL('f?p=&APP_ID.:37:&APP_SESSION.::&DEBUG.::P37_EMPNO:' || empno,NULL,3) AS linkurl
    FROM emp
    

    Then I change the LINKURL Link Text column

    
    

    Link attributes

    class="hideMe508"
    

    Target URL and URL # (sharp right)

    Kind regards

    Jari

  • Interactive report - calculation of Date filter color highlight SYSDATE

    I have APEX 4.1.0.00.32. Report front right, with a field of date when the element was added. I want to create a filter to highlight (highlights of color) for items added in the last week, called items again

    When I create the filter, it allows me to specify the name, color, etc., but the condition of point date culminating of the "Added_Item >" does not provide a specific date selected in the calendar, whereas I want him ' Added_Item > sysdate-7 ' "»

    I have no luck with TO_CHAR / TO_DATE functions around the sysdate-7. The filter simply indicates that date YYYY - MON - DD HH24 is the expected format.

    date functions not authorized? an alternative?

    Published by: Alan10205659 on March 1, 2012 14:21

    Published by: Alan10205659 on March 1, 2012 14:22

    Hello

    This calculation takes place in IR itself. Click on the action button in IR then Format and calculation

    Best regards, Tony

  • Problem with SQL report to modify data

    Hi all

    I don't know that I'm writing this question in the right page or not. But my question is: I have a column in my table which is of type varchar. Data in this column are as Fallows:

    257414/45y
    194662223445 8877/j7tg
    .....
    I wanted to know, is anyway I can show this data in my report without any / or - fallow:

    25741445y
    1946622234458877j7tg

    Just for your information, this is a sql report.

    Thank you

    I read your question because how do you remove both the ' / ' and '-' characters. If true do as follows:

    Select REPLACE(REPLACE('194662223445-8877/j7tg','/'),'-','') from DUAL
    

    At the end of the statement where ") of the DOUBLE appears, these two single quote characters have no space between them. That means replace NULL for the characters you want to replace.

    You can test the statement leaving from DOUBLE. Once satisfied, change it to 'from MyTable '.

    I don't know what to tell you on the TTITLE. It of what I used and always works to print a title.

  • Link to the interactive report with filters

    I want to put a link to a page that contains an interactive report. But the link must set up a filter for the interactive report.

    For example, if I am looking at a customer, I want a link that sends me the reports, but filtered to show only this customer already.

    Is it possible to do?

    Thank you

    Published by: user1415525 on September 21, 2009 07:34

    Hello

    Set a parameter Anthony to ##.

    Example: Set IR_ORDER_ID to #ORDER_ID #.
    or for you
    Set IR_CUSTOMER_ID to #CUSTOMER_ID #.

    (Of course you must change the column names)

    Greetings,
    Roel

    http://roelhartman.blogspot.com/

  • Interactive reports &lt; GO &gt; button.

    I'm trying to use a db function on a page that generates data on the support which is then reported on an interactive report region, but I have problems once the interactive key report < GO >.

    Essentially on loading a page with the interactive report

    (1) a function is called to generate temporary data should be written on.
    (2) page with interactive report showing the data.
    (3) remove the temporary data in this report.

    The idea being that we could perform complex operations on data in the service but who have a simple report just to pull the back of the table (for details, see below).
    When the page is loaded the data very well, but if I use the action button < GO > I don't get "data Found." I don't know why the CHARGE of ON does not run again. Maybe if I could find a way to call my function when <>this button is pressed it might work. Any ideas?


    The table that holds temporary data report (E_REPORT).

    CREATE TABLE E_REPORT
    (
    NUMBER OF SEQ_ID,
    SEAT VARCHAR2 (2 BYTE) NOT NULL,
    ENGINE_TYPE VARCHAR2 (5 BYTE),
    ENGINE_SERIAL VARCHAR2 (30 BYTE) NOT NULL,
    NUMBER OF PROJECTED_HOURS
    START_DATE DATE NOT NULL,
    END_DATE DATE,
    PK_OF_ENGINE NUMBER NOT NULL
    )

    FUNCTION to generate and return a unique id to each time it is called and insert lines in the E_REPORT table with the column being filled with the unique ID seq_id.

    CREATE OR REPLACE FUNCTION E_LOGBOOK. F_load RETURN NUMBER IS
    /*
    This function is used to demonstrate the use of function to create temporary data that
    a report of the apex is attached.
    The idea being that we could build a more complex if necessary report using the functions.
    */

    CURSOR cur_get IS
    SELECT
    E.SEAT, E.ENGINE_TYPE, E.ENGINE_SERIAL,
    E.PROJECTED_HOURS, E.START_DATE, E.END_DATE,
    E.PK_OF_ENGINE
    OF E_ENGINE_PROJECTED_LIFE_2;

    CURSOR cur_report_id IS
    SELECT double SEQ_ART_RREQ_ID.nextval;

    number of ln_rep_id;

    BEGIN

    OPEN cur_report_id.
    SEEK cur_report_id INTO ln_rep_id;
    CLOSE Cur_report_id;

    / * Would be generally more complex than a copy of the right table * /.

    FOR rec IN cur_get LOOP

    INSERT INTO E_REPORT)
    SEQ_ID,
    SEAT,
    ENGINE_TYPE,
    ENGINE_SERIAL,
    PROJECTED_HOURS,
    START_DATE,
    END_DATE,
    PK_OF_ENGINE)
    VALUES (ln_rep_id,
    recomm. SEAT,
    recomm. ENGINE_TYPE,
    recomm. ENGINE_SERIAL,
    recomm. PROJECTED_HOURS,
    recomm. START_DATE,
    recomm. END_DATE,
    recomm. PK_OF_ENGINE);

    END LOOP;
    commit;

    Return ln_rep_id;
    END;
    /



    Interactive report query.
    Select SEQ_ID,
    SEAT,
    ENGINE_TYPE,
    ENGINE_SERIAL,
    PROJECTED_HOURS,
    START_DATE,
    END_DATE,
    PK_OF_ENGINE
    of E_REPORT
    where seq_id =: P260_REPORT_ID

    On a CHARGE BEFORE the header PL/SQL anonymous block a call to the function of inserting rows in the E_REPORT table before the report is displayed.
    Start
    : P260_REPORT_ID: = f_load;
    end;


    On LOAD AFTER FOOTER PL/SQL anonymous block.  Deletes the rows in the table unique ID.

    IF: P260_REPORT_ID is not null then
    remove from E_REPORT
    where seq_id =: P260_REPORT_ID;
    commit;
    END IF;



    Thanks, Pete

    Pete,

    Due to the fact that the OnLoad events occur during the loading of the page, you are in the situation that you must create a data set that will remain intact for the duration of the user is on the page. You could go the way of a temporary table that linked the records in the table to the session using the session id, but then you must have some sort of clean up the process to delete the records once the user has been 'done '. APEX Collections mainly do it for you.

    When you create a collection, under the covers of the collection is related to the current session and only this session can see the data in the collection of this user. APEX is a task that runs that deletes the collections for the sessions that no longer exist, so it does the job for you.

    In my humble OPINION, if you NEED to create transitional data to account, the collections are the solution.

    PS Don't forget to mark messages as useful or answer!

    Hope that helps,

    -Doug-

    http://sumnertech.com/

Maybe you are looking for