Reg: Cardinality Feedback for queries with variable bind

Hi all

One of my query (having no bind variables) takes a lot of time (10 minutes) to run for the second run.

I came to know that its due to the feedback of the cardinality.

I disabled _optimer_use_feedback for help and the query has been run within 2 seconds.

If I disable _optimizer_use_feedback at the instance level, is there a problem for queries with variable bind?

> Sorry! I'm not suppose to disclose the NAMES OF THE TABLES

OK, no problem and I take this restriction as a chance to learn what is cardinality comments, and similar expressions.  Now, since you can't explain post program for our help, I would try to explain what is comments of cardinality and similar expressions: (since you did not mention Oracle version, so I guess it's 11.2.0.1)

In the Oracle 11.2.0.1 database some SQL statements returns significantly different lines i.e. for some SQL statements earlier execution plan there are has 100 lines by optimizer in the first plan of execution and, where the same SQL statement executed, based optimizer 1000 lines.  This happens because of several cursors for child for a single SQL statement and change bind peeking, collection of statistics, characteristic of re-optimizing 11.2.0.1, permission to referenced objects, ACS (Adaptive Cursor sharing) etc.  The preaching of changes to lines due to above reasons as well regarding also the SQL statements that are not contains the variable i.e. AKA vibration cardinality of liaison function.

I will highly recommend to read other links below:

Cardinality feedback | Notebook of the Oracle

http://www.centrexcc.com/tuning%20by%20Cardinality%20Feedback.ppt.PDF

https://blogs.Oracle.com/optimizer/entry/cardinality_feedback

Concerning

Girish Sharma

Tags: Database

Similar Questions

  • Compare with variable binding sql stored proc vs

    I have a complicated logic coded in the two sql with variables and stored procedure I need to compare the performance of the two and decide which binding. with sql, I think I must watch the plan exec etc. and get metrics. How can I do to stored proc

    user8798946 wrote:
    the sql will be a plsql function. I have to choose wheter I implemting the sql code in the plsql or a version of sql plsql. hope that what I say makes sense.

    Are you meaning "I can write an SQL statement in a procedure, or I can PL/SQL code to do the same thing as the SQL statement and the loop via a slider?

    If so, then go with the SQL statement.

  • Element of the page to send: need for clarification on variable bind and online help

    Hello

    For dynamic actions "Code from PL/SQL Execute", online help for the PL/SQL Code is as below:

    Specify a single anonymous PL/SQL block, which will be executed on the server to run.

    You can reference another page or link elements of the application from your application here by using syntax (for example: P1_MY_ITEM), but if you don't you need to include in the "Items to submit Page" attribute also.

    For example:

    Start

    setCommission(:P1_SAL,:P1_JOB);

    end;

    In this example, you must also include P1_SAL, P1_JOB in the "Items to submit Page" attribute.

    When I read this I understand that I must include in the 'Page of Items to send' attribute if I want to use bind syntax for them. In fact, I include in the "Elements of Page to submit" attribute if I can submit their values on the server and use this new value in the PL/SQL Code. If I want to use are already in session and I want to use these values, but not the new values (updated on the screen, for example), I don't have to submit to the server and I can use the bind syntax to get values that are already in session state.

    It was perhaps obvious, but it wasn't for me before I did a few tests with the attribute "Page of Items to submit". I don't know if I'm clear. English is not my mother tongue.

    Could someone confirm or not the behavior I described?
    Perhaps the online help could be updated to be more obvious if what I described above is true.

    Thank you

    Hello

    Your interpretation is correct. And you can use the old values in the syntax of the bind variables, provided that you have not changed the in your PL/SQL.

    Glance in this way, when a page is loaded from an HTML document is created in the browser that reflects the State of session maintained on the server. But at the time wherever the page is loaded, the two are completely separate and can be manipulated independently of eachother. JS and dynamic Actions using JS work only on the DOM HTML template while Ajax and the PL/SQL work on the Session State on the server.
    So when the page is be displayed two, HTML and session state, can be completely different depending on how you handled the.

    The DOM HTML template and Session state again get synchronized (new values recorded or scrapped) in the treatment of the consignment and the State resulting is again used to render him refresh / reloaded page.

    Kind regards

  • CF report queries with Variables

    Hello again,
    It is the third time that I am ready for this issue, and I really, really need an answer, please. I have this query on my .cfr:
    ___________________________________
    SELECT call_product.call_product_detail, call_service.call_service_detail, area_code.area_code_detail, cform.cform_phone_number_body, cform.cform_date_time, cform.cform_comments

    Carousel, call_service, area_code, call_product


    WHERE cform.cform_date_time BETWEEN #CreateODBCDateTime (cFullStartDate) # #CreateODBCDateTime (cFullEndDate) # AND cform.cform_call_type = 3 AND call_product.call_product_id = cform.cform_call_product AND call_service.call_service_id = cform.cform_call_service AND area_code.area_code_id = cform.cform_phone_area_code AND

    ORDER BY call_product.call_product_detail, call_service.call_service_detail, cform.cform_date_time ASC
    ___________________________

    And I have the attached code to call this report. whenever I run he said variable cFullStartDate is not defined, and I have no idea why it doesn't work. I know it's probably something stupid, so I tried to simplify the message as much as possible, if there is everything that you would need it please let me know. Thanks in advance!

    To see where the problem, double-click the Total_sales_report_by_date.cfr definition file to open with Report Builder. Follow the menu file-online Code snippet.

    You will find that the query in the CFC contains the clause, WHERE the cform.cform_date_time BETWEEN #CreateODBCDateTime ( cFullStartDate) # AND #CreateODBCDateTime ( cFullEndDate) #. That cannot be good. The CFC is supposed to be called before the cfreport tag. Yet the variables cFullStartDate and cFullEndDate that needs the CFCS are still undefined. Apparently, you don't define that later in the cfreport tag. It is not possible... until you add the scope of the param. Which makes cfreportparam variable dynamically available in Report Builder when running.

    So, change the WHERE clause to WHERE the cform.cform_date_time BETWEEN #CreateODBCDateTime ( param.fullStartDate) # AND #CreateODBCDateTime ( param.fullEndDate) #. The rest of the code should be something like this:

  • "Partition for ' with a variable binding

    Does anyone know if a variable binding can be used with the syntax ' score for "? For example,.
    select max(col1) into myvar from t partition for (mydate);
    where t is a range-partitioned table.

    I couldn't find any documentation specifically about this and all the ways I have tried do not have :-(


    Edit: version 11.2

    >
    Is the 'for' typo?
    >

    It seems to be a valid syntax of 11.2.

    The SQL reference does that bind variables cannot be used in the partition for clause. Look for partition_extended_name and you will find a section "restrictions on scope names.

    Kind regards
    Bob

  • Cursors for parent and child, bind variable and library cache

    I was going through the documentation to understand the difference between the parent and the child cursors. Surprisingly, there's not too much help for this. I was able to collect the following information about this

    For each statement SQL cache library contains a cursor "parent" for the text of the SQL statement. The parent cursor is composed of a "handle" that can be searched by the hash value via the library cache hash table and an «object' which contains pointers to each of its «child» cursors Each cursor of the child is also composed of a handle and an object. The child object is composed of two segments numbered from 0 to 6. Lot 0 contains all the credentials for a particular version of the SQL statement and lot 6 contains the execution plan. This distinction between parent and child cursors is maintained even when there is only one version of each SQL statement.

    Lets say that 2 LMD were fired with the same set of variables bind (names of variables were same but differed from the value.) The only difference between the 2 LMD was the value of the variable binding) and under the same conditions of load.

    These DML 2 would be a sliders 2 children of one parent only cursors.

    Please tell me detailed documentation on the subject, so my question is too elementary

    Kind regards
    Vishal

    I'm not sure how useful jumping in stuff like bunch 0 and 6 bunch is in terms of understanding what is a parent and what is a child cursor.
    This quote seems to come from Steve Adams - http://www.ixora.com.au/q+a/0104/19005414.htm
    It's a good idea to cite your references.

    I'll give it a go.

    A cursor is a lot of information stored in memory on a SQL statement.

    The basic information for a parent cursor is the text of the SQL statement - exact matches of the statement can only share the parent cursor.

    The cursor of the child is really on the implementation plan specific for a statement and the different settings and parameters that caused this plan to be generated.

    There are a whole bunch of reasons why the executions of the same SQL statement may or may not reuse the existing child cursors.

    In your example 2 statements that differ by the variable binding are likely to lead to different children, although there are factors that can lead to lie different values, do not share the same children among whom for example, the length of the dregs, Adaptive setting cursor_sharing = similar and histograms, or new features like cursor sharing (on subsequent runs of renowned sql running suboptimal initially).

    It might be useful to see V$ SQL_SHARED_CURSOR. This shows the disparities that cause children to not be shared. There are more than 60 columns in this view which gives an indication of the number of factors that can influence.
    http://download.Oracle.com/docs/CD/E11882_01/server.112/e17110/dynviews_3059.htm#REFRN30254

    You might want to look here the criteria for sharing SQL:
    http://download.Oracle.com/docs/CD/E11882_01/server.112/e16638/memory.htm#i40017

    Away from the main documentation, perhaps some of the writings of the optimizer Development Group could help?
    http://blogs.Oracle.com/mt/mt-search.cgi?blog_id=3361&tag=cursor%20sharing&limit=20

    Christian Antognini described this area very well in the "Oracle Performance Troubleshooting Guide".

    Published by: Dom Brooks on February 24, 2011 16:45

  • Links for FM 10 with variables

    FM 10, RH 9 related files

    I have variables in the FM book file to change the name of the client, etc.. They are great! However, HR when I link to book of FM, the variables do not come properly. Variables exist, I can change them, and content help is updated as expected. However, they do not come WITH the correct Variable text.

    for DS in variable FM "Cust_name" = Kensullco.

    But HR "Cust_name" = Domco, which was the old definition of this variable.

    I have updated the files. Several times. Started by removing my files and reissue of all links. The variables are still coming in w / the old definitions. I added a test text in a file to make you think I'm a link properly, that I am. Why am I bad data in my variables? Any idea?

    Thanks for the help!

    Hello

    Variables in FrameMaker are over imported in RoboHelp when you bind a variable with FrameMaker document and they disconnect Framemaker files, so on the update you do not get these updated values.

    I propose a solution to workaround before updating your link, you must remove the variables product FrameMaker in the user defined variables POD (view-> pods-> variables defined by the user), it will be not a time consuming task that you can use the MultiSelect (by ctrl + click or shift + click) and then update the variables will be re created with values updates - an extend script can be used to remove all udv if you are sure you do not create a variable directly in RoboHelp

    OR

    to make it more efective time, you can do a selective deletion for only variables that have changed in the FrameMaker document and they are going to get recreated on the next update

    Hope this will help

    Ashish

  • For loops with the array variable

    I am using a loop for example with the name of the table in the select variable, but get a compilation error

    for current_aud_row in (select * from ' | table_name |' where...)


    table_name contains the name of the actual table

    I do that I get the name of the table as a parameter.
    Help, please!

    Excellent. Oracle APEX (Application Express) is a web IDE and RTS - it makes heavy use of DBMS_SQL to execute SQLs and restore these dynamically in the form of Web-based reports, or turn it into XML for graphical rendering using Flash software.

    DBMS_SQL is perhaps more complex (and only really necessary when it comes true dynamic SQL at all stages - including the result of SQL), but we must know how to use and apply. It is a valuable tool at times.

  • How many times can I use a variable binding in a query of the VO?

    Is it possible that I can use a variable binding in a query of VO just once?

    I test a query that keeps throwing the Houston-27122 error by pressing the application module tester. I tried to limit the problem to the simplest possible case, and it seems that the error is caused by the fact that I use the same variable bind two or more times.

    When the query looks like this:

    query1.png

    I have run, enter 'x' and it returns me the result.

    When I change to:

    query2.png

    I have run, enter the value

    param.png

    and immediately get the error

    error.png

    The same thing in sqlplus runs without problem:

    sqlplus.png

    My version of JDev is build JDEVADF_11.1.1.9.0_GENERIC_150314.0718.6673

    Please, advise.

    P. S. where can I find documentation queries are supported in your? In particular, I'm interested if I can use WITH the clause. There seems to be some confusion on this matter (see, for example, Oracle SQL WITH clause support - JDeveloper and ADF)

    Thank you.

    It depends on:

    Open your VO in JDev and go the the query page.

    In the lower part, there is a drop down 'link type', it is usually set to "JDBC-positional. In this case, you will need to provide the bind value for each occurrence of the variable binding separately.

    You could change that to "named" (don't remember the exact name). But beware, this will also affect all relatioships master retail to others your. I think that this is not a good idea to change the style of binding to a single VO.

    Good bye

    DPT

  • Variable binding defined in LOV

    Hi, I use JDev 11.1.1.7

    I have a VO (FundingNameVO) which takes in bind variable.

    FundingNameVO is used as LOV in an another VO (ProjectVO) for a FundingName attribute.

    ProjectVO also has an attribute FundingSource has also a LOV.

    When FundingSource is selected, the value must be sent to the liaison FundingNameVO variable to determine the LOV to display for FundingName,

    How to pass the FundingSource value to the variable of FundingNameVO binding?

    Thank you.

    Hello

    If the value of the variable binding from attribute ProjectVO follow these steps:

    in tab display accessor is ProjectVO, you have added an instance of FundingNameVO, click the view accessor on Edition, then in the open Panel, you see the bind variable, set the value of the variable binding with the good ProjectVO attribute name

    If not check this: http://www.jobinesh.com/2011/03/initializing-bind-variables-in-query.html

    Kind regards

    Habib

  • Oracle OFA customization list of values (LOV) mapping in Where clause with variables

    Hi all

    I have a requirement to add the condition of the UOM LOV I don't understand under conditions in LOV for example mcc.inventory_item_id =: 1 what: 1 means? and how the system look at the value in: 1? if I have to add the condition to the middle which number should I use?

    SELECT * FROM (SELECT distinct muc.unit_of_measure unit_meas_lookup_code, muc.unit_of_measure_tl unit_meas_lookup_code_tl, muc.description, muc.uom_class, muom.uom_code FROM mtl_uom_conversions_val_v muc, mtl_units_of_measure muom WHERE (muc.uom_class IN (SELECT mcc.to_uom_class CMC mtl_uom_class_conv_val_v WHERE mcc.inventory_item_id =: 1) muc.uom_class = GOLD: 2), AND (muc.item_id =) ((: 3 GOLD muc.item_id = 0) AND muc.unit_of_measure = muom.unit_of_measure) QRSLT WHERE ((UPPER (UNIT_MEAS_LOOKUP_CODE_TL) like UPPER(:4) AND (UNIT_MEAS_LOOKUP_CODE_TL like: 5 OR UNIT_MEAS_LOOKUP_CODE_TL as: 6 OR UNIT_MEAS_LOOKUP_CODE_TL as: 7 OR UNIT_MEAS_LOOKUP_CODE_TL as: 8))) ORDER BY upper (unit_meas_lookup_code)

    LOV.png

    Concerning

    A.S.

    Hey A.S.,.

    Looking more closely at the image you included, it seems that it is already a custom code, it starts with "Xx".  You should see if you have the available custom code.

    To answer part of your original question ""mcc.inventory_item_id =: 1 what: 1 means? ' " The ': 1 ' is a variable binding in the SQL code.  This value is populated at run time by using the "setWhereClauseParam (Bind number, value).  You can see the details of the request and the variable linking using JDeveloper and a double-tap on the View object.  Again, this should be in the custom code of the object View 'atco.oracle.apps.po.lov.server.XxDocumentUomBothVo '.

    I hope this helps.

    Thank you

    Tim

  • Question PLSQL with variable compound column names

    Hello gentlemen,


    I'm new to PLSQL and I would like to display some values of columns, which are listed in the defined variable in dbms.output. I created under code, which I think it could work, but I guess that it is far from correct.


    DECLARE
    v_TEMP_QUERY VARCHAR2
    (1000 BYTE);
    v_TEMP_VALUE VARCHAR2
    (1000 BYTE) := 'FILTER_01, FILTER_02';

    BEGIN  
    FOR v_TEMP_LOOP IN
    (v_TEMP_QUERY := 'SELECT DISTINCT ' || v_TEMP_VALUE || ' FROM CW_PAGE_COMPONENT_TEMPL WHERE COMPONENT_TEMPL_ID = 10000034642';
    EXECUTE IMMEDIATE v_TEMP_QUERY; )
    LOOP
    DBMS_OUTPUT
    .PUT_LINE (v_TEMP_LOOP.v_TEMP_VALUE);
    END LOOP;
    END;


    Thanks in advance for your help and advice on this issue and sincerely,

    Sebastian

    OK, first of all, you're confused concepts here.

    cursor loop FOR waiting for a slider must be provided, and yet you offer an assignment statement and a command immediately execute for it.  Syntax is not valid.

    Secondly, you force the way of the use of dynamic SQL, which is generally bad practice.  This use of the SQL is rarely necessary, because it often indicates that functional requirements, database design, or design/code enforcement has not examined properly... the first question is "why don't you know the names of the columns to select.  With dynamic columns in your query, you need some kind of dynamic code to manage the results of the query, you will not be able to reference the columns directly by name.

    Thirdly, the DBMS_OUTPUT package doesn't make "blank".  This may sound pedantic, but it's a common mistake that people make.  There is no fill data dbms_output buffer.  It relies on call code/interface to read the contents of the output buffer and display it in fact (for example, in SQL * more you use SQL * Plus the command "set serveroutput we ' to achieve)

    In general, in a well designed where application you know your columns you would only make...

    Start
    I'm in (select distinct filter_01, filter_02 from vw_page_component_templ where component_templ_id = 10000034642)
    loop
    dbms_output.put_line (i.filter_01 | ',' | i.filter_o2);
    end loop;
    end;

    If the columns are dynamic, then you have three options:

    (1) create a ref and pass cursor who back, extracting the content for example

    sys_refcursor getRc function returns (in numbers, in colnames templ_id varchar2) is
    RC sys_refcursor;
    Start
    Open rc for ' select distinct ' | colnames |' from vw_page_component_templ where component_teml_id =: 1' using templ_id;
    return rc;
    end;

    In SQL * more:

    var r refcursor; -It creates a variable in SQL * Plus ref cursor type
    Start
    : r: = getRc (10000034642, ' filter_01, filter_02');
    end;
    /
    print r;      -It's SQL * command to retrieve the cursor open and display the results

    (2) create an object and collection of the right structure to receive the results and use execute immediate to select IN this structure.

    (I will not show in this way, because it is absolute rubbish, and if you know the columns that you want to create the object and the collection, then you should not use dynamic SQL in the first place)

    (3) use the DBMS_SQL package to run the query and retrieve the data from the column in position rather than example:

    create or replace procedure run_query (p_sql IN VARCHAR2) is
    v_v_val varchar2 (4000);
    number of v_n_val;
    date of v_d_val;
    number of v_ret;
    c number;
    number d;
    whole col_cnt;
    Boolean f;


    rec_tab dbms_sql.desc_tab;
    number of col_num;
    v_rowcount number: = 0;
    Start
    -create a slider
    c: = dbms_sql.open_cursor;
    -analyze the SQL statement in the cursor
    DBMS_SQL. Parse (c, p_sql, dbms_sql.native);
    -run the cursor
    d: = dbms_sql.execute (c);
    --
    -Describe the columns that are returned by the SQL statement
    DBMS_SQL. DESCRIBE_COLUMNS (c, col_cnt, rec_tab);
    --
    -Local variables Bind to return to the different columns according to their types
     
    dbms_output.put_line (' number of columns in the query: ' | col_cnt);
    1.col_cnt j
    loop
    case rec_tab (j) .col_type
    When 1 then dbms_sql.define_column (c, j, v_v_val, 2000); -Varchar2
    When 2 then dbms_sql.define_column (c, j, v_n_val);      -Number
    12. When can dbms_sql.define_column (c, j, v_d_val);     -Date
    on the other
    DBMS_SQL.define_column (c, j, v_v_val, 2000);  -Any other type of return as varchar2
    end case;
    end loop;
    --
    -Display columns are returned...
    dbms_output.put_line ('- Columns-');
    1.col_cnt j
    loop
    dbms_output.put_line (rec_tab (j) .col_name |') -' || case rec_tab (j) .col_type when 1 then 'VARCHAR2 '.
    When 2 then 'NUMBER '.
    When 12 can "DATE".
    "Otherwise, 'Other' end);
    end loop;
    dbms_output.put_line('---');
    --
    -This part generates the DATA
    loop
    -Retrieves a row of data using the cursor
    v_ret: = dbms_sql.fetch_rows (c);
    -Output when no more line
    When the output v_ret = 0;
    v_rowcount: = v_rowcount + 1;
    dbms_output.put_line (' line: ' | v_rowcount);
    dbms_output.put_line('---');
    -Extract the value of each column of the row
    1.col_cnt j
    loop
    -Fetch each column to the correct data type according to the description of the column
    case rec_tab (j) .col_type
    When 1 then dbms_sql.column_value (c, j, v_v_val);
    dbms_output.put_line (rec_tab (j) .col_name |': ' | v_v_val);
    When 2 then dbms_sql.column_value (c, j, v_n_val);
    dbms_output.put_line (rec_tab (j) .col_name |': ' | v_n_val);
    12. When can dbms_sql.column_value (c, j, v_d_val);
    dbms_output.put_line (rec_tab (j) .col_name |': ' | to_char (v_d_val,' DD/MM/YYYY HH24:MI:SS'));))
    on the other
    DBMS_SQL.column_value (c, j, v_v_val);
    dbms_output.put_line (rec_tab (j) .col_name |': ' | v_v_val);
    end case;
    end loop;
    dbms_output.put_line('---');
    end loop;
    --
    -Close the cursor, now we're done with it
    DBMS_SQL.close_cursor (c);
    END;
    /

    SQL > run_query exec ('select ename, empno, sal, deptno from emp where deptno = 10');
    Number of columns in the query: 4
    -Columns-
    EMPNO - NUMBER
    ENAME - VARCHAR2
    DEPTNO - NUMBER
    SAL - NUMBER
    -------------
    Line: 1
    --------------
    EMPNO: 7782
    ENAME: CLARK
    DEPTNO: 10
    SAL: 2450
    --------------
    Row: 2
    --------------
    EMPNO: 7839
    ENAME: KING
    DEPTNO: 10
    SAL: 5000
    --------------
    Row: 3
    --------------
    EMPNO: 7934
    ENAME: MILLER
    DEPTNO: 10
    SAL: 1300
    --------------

    PL/SQL procedure successfully completed.

    As you can see with this method, you can extract the column details, including the name and data etc. types and then extract each line and extract the data from the column position.

    Of course, this is quite complex, so it would be a last resort.

  • The value of variable binding VO on page load by program

    Hello everyone!

    I use JDeveloper version 11.1.2.3.0

    I am currently trying to get the filtered data to a VO, based on a WHERE clause with a variable binding. This process must be done on the loading of the page. I have set this variable for liaison with the id of the logged in user (the part to get this id is already reached and used somewhere else). My current approach is to define a bean managed with scope pageFlow. Inside of this, I have a method in which I get the id and I put it as parameter. The code snippet:

          BindingContainer bindings = getBindings();
            OperationBinding operationBinding = bindings.getOperationBinding("getUserIdFromUsername"); //getUserIdFromUsername is a method defined in the AppModule and exposed in the client interface
           operationBinding.getParamsMap().put("username", getUserName());
          Object userID = operationBinding.execute();
            setUserId(Integer.parseInt(userID.toString()));
           System.out.println("THE USER ID IS: "+getUserId());
           BindingContainer bindings2 = getBindings();
           OperationBinding operationBinding2 = bindings.getOperationBinding("ExecuteWithParams");  // i've dragged and dropped the ExecuteWithParams operation into the page
           operationBinding2.getParamsMap().put("userId", getUserId());  // userId is the bind variable which i'm talking about
            Object result = operationBinding2.execute();
    
    
    

    Then I call this method on BeforePhase in the view of the page. It works, I get the filtered data and the println shows me the correct ID. The problem is that whenever I select a row in the table showing the data, the page seems to reload and it always reload the selection at the forefront.

    What I am doing wrong? Maybe this isn't the right approach, that I saw a few other posts on this topic, but they are not very clear to me.

    Please advice

    OK, that's what I did. I created the method to set the value of the variable to bind to the query of the VO in the AppModule instead of inside the bean (this method also runs the query) and client presentation to the interface. After I have created the method call in the section of links the pagedef (where he gets the value of the id of the bean in the original post), and followed Cvele_new_account suggestion, calling the method as follows:

    RefreshCondition = "#{! requestContext.postback and empty bindings.exceptionList}" / >

    Thank you for the help guys!
  • How not to display variable binding in the query ADF search panel?

    Hello, I use JDeveloper 11.1.2.3.0.

    I have a variable binding in my VO, (* required) that I use in the sql query. I put the value of this variable to link through the groovy expression so I don't have to manually put through my page. It works fine but the problem is that it appears in the query ADF Panel that I created in my page. To do this, I created a ViewCriteria and I've specified to display only 3 (other) fields for the simple search. Apart from the selected 3 variable bind shows here again because its value is set. I tried to remove the ' * required ' of the variable binding in the original Version, but in this case I have problems with my sql query.

    Does anyone know how this variable is not to display in the Panel request ADF?

    Thank you

    Has tried to define the binding to bee hidden variable?

    Controll tips, hint of display = hide

  • How to run execute immediate with variables

    Hi friends,
    How to run execute immediate with variables in v_stmt below?
    I don't know how to declare value I have here.
    Set serveroutput on;
    DECLARE
       i        VARCHAR (20);
       v_stmt   VARCHAR2 (100);
    
       CURSOR c
       IS
          SELECT sqlid FROM temp1;
    
    
    BEGIN
       OPEN c;
    
       LOOP
          FETCH c INTO i;
          EXIT WHEN c%NOTFOUND;
          DBMS_OUTPUT.put_line (i);
          v_stmt := 'select * from table(dbms_xplan.display_cursor('&i',null))'
          execute immediate v_stmt;
       END LOOP;
    
       CLOSE c;
    END;
    /
    Regds,
    Kunwar.

    You must first use a variable binding (named ': v' in the SQL statement in my example):

    set serveroutput on;
    DECLARE
       i        VARCHAR (20);
       v_stmt   VARCHAR2 (100);
    
       CURSOR c
       IS
           -- modified for a quick test
          SELECT sql_id FROM v$sql where child_number > 2;
    
    BEGIN
       OPEN c;
    
       LOOP
          FETCH c INTO i;
          EXIT WHEN c%NOTFOUND;
          DBMS_OUTPUT.put_line (i);
          v_stmt := 'select * from table(dbms_xplan.display_cursor(:v,null))';
          execute immediate v_stmt using i;
       END LOOP;
    
       CLOSE c;
    END;
    /
    

    However because your SELECT statement returns multiple lines, you need to adapt your code to process all rows returned (as already suggested in first response to your message).

    Instead of using the PL/SQL, I recommend you to generate a SQL file using only SQL, and then run the generated SQL file.
    For example:

    spool edx.sql
    set serveroutput on
    declare
    v_stmt varchar2(100);
    v_q char(1):='''';
    begin
    dbms_output.put_line('spool edx.log');
    for s in (select sql_id from v$sql where child_number >2)
     loop
      dbms_output.put_line('select * from table(dbms_xplan.display_cursor(' || v_q || s.sql_id || v_q || ',null));');
     end loop;
     dbms_output.put_line('exit');
    end;
    /
    spool of
    

    This generates a file similar to:

    spool edx.log
    select * from table(dbms_xplan.display_cursor('5rygsj4dbw6jt',null));
    select * from table(dbms_xplan.display_cursor('5rygsj4dbw6jt',null));
    select * from table(dbms_xplan.display_cursor('5rygsj4dbw6jt',null));
    select * from table(dbms_xplan.display_cursor('fsbqktj5vw6n9',null));
    select * from table(dbms_xplan.display_cursor('6q42j0018w7t8',null));
    select * from table(dbms_xplan.display_cursor('a5mmhrrnpwjsc',null));
    select * from table(dbms_xplan.display_cursor('3c1kubcdjnppq',null));
    select * from table(dbms_xplan.display_cursor('3c1kubcdjnppq',null));
    select * from table(dbms_xplan.display_cursor('9gkq7rruycsjp',null));
    select * from table(dbms_xplan.display_cursor('f0wj261bm8snd',null));
    select * from table(dbms_xplan.display_cursor('ab3swhv5g138y',null));
    select * from table(dbms_xplan.display_cursor('6vgvyh4xw9c5g',null));
    select * from table(dbms_xplan.display_cursor('ak5crjygnpk60',null));
    select * from table(dbms_xplan.display_cursor('9p6bq1v54k13j',null));
    select * from table(dbms_xplan.display_cursor('19x1189chq3xd',null));
    select * from table(dbms_xplan.display_cursor('7sx5p1ug5ag12',null));
    select * from table(dbms_xplan.display_cursor('730vdzhng6m6g',null));
    select * from table(dbms_xplan.display_cursor('730vdzhng6m6g',null));
    select * from table(dbms_xplan.display_cursor('0v3dvmc22qnam',null));
    select * from table(dbms_xplan.display_cursor('0v3dvmc22qnam',null));
    select * from table(dbms_xplan.display_cursor('a1zv6wju3ftgv',null));
    select * from table(dbms_xplan.display_cursor('7ng34ruy5awxq',null));
    select * from table(dbms_xplan.display_cursor('7ng34ruy5awxq',null));
    select * from table(dbms_xplan.display_cursor('b2gnxm5z6r51n',null));
    select * from table(dbms_xplan.display_cursor('b2gnxm5z6r51n',null));
    select * from table(dbms_xplan.display_cursor('g4gp07gt2z920',null));
    select * from table(dbms_xplan.display_cursor('1gu8t96d0bdmu',null));
    select * from table(dbms_xplan.display_cursor('g00cj285jmgsw',null));
    select * from table(dbms_xplan.display_cursor('g00cj285jmgsw',null));
    select * from table(dbms_xplan.display_cursor('g00cj285jmgsw',null));
    select * from table(dbms_xplan.display_cursor('bn4b3vjw2mj3u',null));
    select * from table(dbms_xplan.display_cursor('38243c4tqrkxm',null));
    select * from table(dbms_xplan.display_cursor('2abjfnvy5rkyg',null));
    select * from table(dbms_xplan.display_cursor('350f5yrnnmshs',null));
    select * from table(dbms_xplan.display_cursor('350f5yrnnmshs',null));
    select * from table(dbms_xplan.display_cursor('3s1yukp05bzg6',null));
    select * from table(dbms_xplan.display_cursor('3s1yukp05bzg6',null));
    select * from table(dbms_xplan.display_cursor('1tgukkrqj3zhw',null));
    exit
    
    PL/SQL procedure successfully completed.
    

    Edited by: P. Forstmann March 20, 2013 19:06

    Edited by: P. Forstmann March 20, 2013 19:33

Maybe you are looking for

  • Report of health of 39.0 Firefox not working not properly

    The startup time of days graph shows no date and only one green dot in the middle of the screen. Time open this month seems also reset every time Firefox is closed. The other bits of the information provided in the report as the number of bookmarks,

  • Phantom calls

    I get calls missed other iPhones and that they receive from me I have 5 lines

  • Two questions with Satellite P200-144

    I have a portable Satellite P200 4 months old. I have the following problems: The Realtek speakers do not work. In Device Manager all working correctly but the icon at the bottom of the taskbar indicates that no audio output device is installed. I al

  • I recorded the wrong number and I cannot remove it.

    Hi all I signed recently a number in Skype to Go, which is the number of mobile phone of my boss (I thought I'd save the number I wanted to call, not my own number). It is the Canada and I'm at the Chile. I can't delete his number to record my own nu

  • Zbook 15 3: 3 15 Zbook and compatibility issue P5Q58UT #ABA dock

    Say, if I browse the site, dock compatibility sheet tells me Zbook 15 3 is to use the P5Q58AA docking station, but it is a bit expensive. Surfing the net, I found #ABA P5Q58UT who seems very similar to the plug and the model number and half price...