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

Tags: Database

Similar Questions

  • When to use the cursor for loop and the cursor (open, fetch, close)

    Hello world
    I have a small doubt about when to use the cursor for loop and when to use the cursor for loop and the cursor (open, fetch, close).
    Well, I'm not the difference between implicit and explicit cursor. So please tell me how I got to know, what to use and when?




    Kind regards
    BS2012

    Published by: BS2012 on January 29, 2013 12:15

    All SQLs are analyzed, stored and executed as cursors. Thus, you will always use a cursor.

    The problem is that languages, such as PL/SQL, provide different interfaces to interact with the SQL cursor. As the ref, the slider interface, the interface DBMS_SQL slider interface and so on.

    Each of these interfaces offers different features. For example, using the interface DBMS_SQL allows binding dynamics and dynamic recovery. The Ref Cursor interface allows your code PL/SQL pass a handle to a reference pointing to the SQL cursor, to an external client. Etc.

    The fundamental reason for the use of an explicit cursor interface is mainly that you own and manage bulk made extraction output provided by PL/SQL cursor.

    With a cursor FOR , the motor loop of PL/SQL optimize the loop by extracting block a 100 lines both. However, you cannot access this collection in bulk directly inside the loop.

    With an explicit cursor interface, you specify the size of the extraction in bulk via the clause LIMIT , and you set the variable of collection to use. This allows you to use the collection directly variable inside the loop.

    However, the need to do - code manually in bulk collection - rarely occur in the daily programs in PL/SQL. A line of treatment is both slow and not well fits. And even if your bulk code collects lines, these lines must still be processed one at a time in your code. It is much more efficient and scalable rather write SQL code, and make the engine SQL the line of treatment for you.

  • HTTP Session for tcServer and local caching module

    We use a configuration of GemFire server to store the tcServer HTTP session.  For our applications, tcServer initial, we ran the client as "PROXY" so no session data is actually stored on the client and server GemFire always has the updated copy of the session.  That works well, but now that we had a case where we need to store a local copy of session in memory of each customer (long story).

    What we want to do is to record the session on tcServer client, but also send updates on the server.  We use sticky session, but it will be sometimes a user bounced to another server.  In this case, we want the current copy of the session to be available for the other server.  In this case, now, two clients of tcServer session and we hope that updates would be received by the GemFire server and client caches with entry into their local cache.  We do this in other applications of GemFire (without using the module session) by recording interests in key and which seems to work well.

    We do not seem to get this to work with the HTTP session.  We are trying to do it via CACHING_PROXY_HEAP_LRU, but it seems that the updates to the local cache to remain on the local cache and when we move to another server we get an old copy of the session.

    Is there a way to get these updates session sent to all customers to have this session key in their local cache?  We tried a number of different settings without success.

    It's 2.8.1 and GemFire 6.6.4 tcServer.  Here is the client and server configurations, Coast region.  Any idea that you can provide would be appreciated:

    ----------------------------------------------------
    Client side
    ----------------------------------------------------
    customer - cache.xml - ACWT1402_NEW
    > client-cache <
    < = pool name 'sessions' subscription-enabled = "true" >
    < host locator = "acwt1461" port = "10335" / >
    < / pool >
    < region name = "dww_sessions" refid = "CACHING_PROXY_HEAP_LRU" >
    < region attributes >
    < subscription-interest-policy attributes = "cache-content" / >
    <>expulsion-attributes
    < lru-entry-County maximum = "1000" / >
    < / expulsion-attributes >
    < / region-attributes >
    < / region >
    < / client cache >
    -----------------------------------------------------
    Server-side
    -----------------------------------------------------
    Server - cache.xml - ACWT1461 - SERVER2
    < port cache-server = "40405" / >
    < name of the disk-store = 'DEFAULT' enable-force-compaction = 'true' oplog-max-size = "50" >
    < disk-dirs >
    < disk-dir > d:\vFabric\GemFire-6.6.4\server2\default-diskstore < / disc-dir >
    < / disc-dirs >
    < / record store >
    < persistent pdx = "true" / >
    < region name = "dww_sessions" >
    < region-attributes enable-gateway = 'false' data-policy = "duplicate" scope = "distributed-ack" statistical compatible = "true" >
    < input-time-to-live >
    < timeout expiration-attributes = '0' action 'destroy' = >
    < expiry-custom >
    > class name < com.gemstone.gemfire.modules.util.SessionCustomExpiry < / class name >
    < / custom-expiry >
    < / expiration attributes >
    < / entry-time-to-live >
    < subscription-interest-policy attributes = 'all' / >
    <>expulsion-attributes
    < lru-memory size maximum = "200" action = "infinity-to-disk" / >
    < / expulsion-attributes >
    < / region-attributes >
    < / region >
    < / cache >

    Unfortunately, you will not be able to do.

    Customer subscriptions using requires that the client you interested (via the Gemfire API) and also install a listener to take action when events occur. This feature is not provided with the module session replication. The closest you can come, when using non-sticky sessions, done what you have already tried, which uses a pure client proxy cache.

    -Jens

  • Cursor for loop and IN LOOP

    Hi gurus,

    I'm going to the table like this:

    TEST
    NO      PK
    VALUE
    And I wrote a test cursor procedure to retrieve values such as:
    CREATE OR REPLACE
    PROCEDURE test_proc_cursor
      (
        p_no OUT test.no%TYPE,
        p_value OUT test.value%TYPE)
    AS
      CURSOR proc_cursor
      IS
         SELECT no,value INTO p_no, p_value FROM test;
    BEGIN
      OPEN proc_cursor;
      LOOP
        FETCH proc_cursor INTO p_no, p_value;
        EXIT
      WHEN proc_cursor%NOTFOUND;
        dbms_output.put_line(p_no||'       '|| p_value);
      END LOOP;
      CLOSE proc_cursor;
    END test_proc_cursor;
    But, my question is, I have used the simple LOOP in the cursor. Anyone can write the same logic of cursor with all IN LOOP and LOOP FOR it please

    Thank you

    Published by: user10679113 on January 22, 2009 07:53

    Published by: user10679113 on January 22, 2009 07:54

    Published by: user10679113 on January 22, 2009 07:55

    Hello

    SQL> DECLARE
      2    p_no    test.no%TYPE;
      3    p_value test.value%TYPE;
      4    CURSOR proc_cursor IS SELECT no,value FROM test;
      5  BEGIN
      6    OPEN proc_cursor;
      7    FETCH proc_cursor INTO p_no, p_value;
      8    WHILE proc_cursor%FOUND LOOP
      9      dbms_output.put_line(p_no||'       '|| p_value);
     10      FETCH proc_cursor INTO p_no, p_value;
     11    END LOOP;
     12    CLOSE proc_cursor;
     13  END;
     14  /
    1       awe
    2       JHKBHNJ
    3       548539
    
    PL/SQL procedure successfully completed.
    
    SQL> DECLARE
      2    CURSOR proc_cursor IS SELECT no,value FROM test;
      3  BEGIN
      4    FOR cRec IN proc_cursor LOOP
      5      dbms_output.put_line(cRec.no||'       '|| cRec.value);
      6    END LOOP;
      7  END;
      8  /
    1       awe
    2       JHKBHNJ
    3       548539
    
    PL/SQL procedure successfully completed.
    
    SQL> BEGIN
      2    FOR cRec IN (SELECT no,value FROM test) LOOP
      3      dbms_output.put_line(cRec.no||'       '|| cRec.value);
      4    END LOOP;
      5  END;
      6  /
    1       awe
    2       JHKBHNJ
    3       548539
    
    PL/SQL procedure successfully completed.
    

    Kind regards
    Dima

  • Cursor for display and control time video

    Hey community,.

    I run a video with the IMAQ / AVI components. To this effect I want to have a timeband as there is one in a normal video player. Time turns and if I click the video on the tape should be at this point in the video. Is it possible to manage that, or do I have to separate the time display and an additional control to reach the point of interest?

    In the file there is a small example what I mean. (LabView 2010)

    Thanks Philipp

    Hi Philip,

    You can do this by changing "playback AVI File Example.vi" (see screenshot). I've also attached the VI registered with "to the previous version", I hope it works for you also.

    This example uses the function 'IMAQ AVI2 read framework VI' where you can specify the desired image. So you have only control who can change the current framework, which normally is incremented at each iteration of the loop.

    Best regards

    Christoph

  • Access to safety class for parents and children

    Dear Experts,

    If I give you access a parent to a user entity 'All', it also gives access to the children of the parent entity?

    Thank you very much.

    Kind regards

    Benoit

    Hi Benoit,.

    If you give access to a parent entity 'All', it means that the user will be able to read/write/promote an entity. If in the "Security node" attribute of application properties, you select 'Entity', access will be available only for the specific entity. If you have selected 'Parent', then specific access will be available for all children of that entity.

    Check the man page of admin 90.

    Kind regards

    Thanos

    A truth about...:... options calculation

  • Update MS SQL for APEX pl/sql - Bind variable/field process table

    I created a page APEX that updates a table of linked server sql through the call to a pl/sql process 'submit '.
    The anonymous pl/sql block refers to a hidden field on the page titled "P3_RECORD_ID" in the place where it is clause.
    The pl/sql block, I invoke is:

    Start
    commit;
    Update "SRSRATINGS".
    'Status' value = 'PASS '.
    where "Record_ID" =: P3_RECORD_ID;
    commit;
    end;

    This is block if I replace it with a literal numeric value for the variable/hidden bind field: P3_RECORD_ID. However, when I use the link variable: P3_RECORD_ID, I get the following error:

    ORA-02070: SRS database. MSSQL does not support the TO_NUMBER in this context

    He doesn't seem to understand that P3_RECORD_ID is a reference to the primary key on the form field.

    Any help is appreciated.

    Hello:

    Try if edit the pl/sql block below work

    declare
    l_num number := :P3_RECORD_ID;
    begin
    commit;
    update "SRSRATINGS"
    set "Status" = 'PASS'
    where "Record_ID" = l_num ;
    commit;
    end;
    

    CITY

  • Bind variables in SPARQL WLS jena queries

    Hi all

    We read about the possibilities of support of jena to bind the variables in the documentation (http://docs.oracle.com/cd/E11882_01/appdev.112/e25609/sem_jena.htm#RDFRM248). The problem has been addressed in the next section on 14 June 2014 (Bind Variables in SPARQL queries). However, we are facing other problems.

    We use:

    * WLS 12.1.3.0.0

    * adapter jena 2.11.1.

    * Joseki 3.4.4.

    * ARQ 2.9.2.

    We try to run the following query on the stop of joseki.

    PREFIX foaf: http://xmlns.com/FOAF/0.1/ >

    PREFIX vcard: http://www.w3.org/2001/vCard-RDF/3.0# >

    PREFIX ORACLE_SEM_FS_NS: http://Oracle.com/Semtech#no_fall_back, ODS = 6, ALLOW_DUP = T, s2s >

    PREFIX ORACLE_SEM_HT_NS: http://Oracle.com/Semtech#monitor >

    PREFIX ORACLE_SEM_UEAP_NS: http://Oracle.com/Semtech#f$ RDFVID % 20 to (?) >

    PREFIX ORACLE_SEM_UEPJ_NS: http://Oracle.com/Semtech#f $RDFVID >

    PREFIX ORACLE_SEM_UEBV_NS: http://Oracle.com/Semtech#1264839720472151591 >

    SELECT? f? g

    WHERE

    {graph? g {? vcard:N p? vn.}}

    ? VN vcard:Family? f.

    ? FOAF:title p 'Sen'.}

    }

    However, the result that we get back does not use the variable binding. It returns the entire list without UEAP/UEPJ/UEBV.

    Is there something that I missed in the documentation or should I define some variables for the use of bind variables?

    Kind regards

    Max

    Hi Max,.

    Can you please define the following JVM property to the WLS and restart the middle range?

    -Doracle.spatial.rdf.client.jena.allowAP = true

    This configuration is only necessary when running a variable binding based SPARQL query from a web service endpoint.

    Let me know if this can help,

    Zhe Wu

  • Problems with Bind Variables

    SELECT co.ref_num, co.forename, co.surname, co.dob, a.address, a.postcode,
           co.ni_num
      FROM address a, contact co
     WHERE co.ref_num = a.ref_num
       AND (:1 IS NULL OR co.forename = :2)
       AND (:3 IS NULL OR co.surname = :4)
       AND (:5 IS NULL OR a.postcode = :6)
       AND (:7 IS NULL OR a.address = :8)
       AND (:9 IS NULL OR co.dob = :10)
       AND (:11 IS NULL OR co.ni_num = :12)
    With a jdbc connection, we use a web front end for a new management system. The SQL above runs since a search screen. We meet a few serious problems with bind variable and execution plans. When the above query is sent by the database 'AND' clauses could evaluate as follows:
    AND ('Tim' IS NULL OR co.forename = 'Tim')
       AND ('Clarke' IS NULL OR co.surname = 'Clarke')
       AND ('' IS NULL OR a.postcode = '')
       AND ('' IS NULL OR a.address = '')
       AND ('25051981' IS NULL OR co.dob = '25051981')
       AND ('' IS NULL OR co.ni_num = '')
    We cannot dynamically assign 'AND' conditions so they are sent through to the database. This translates FTS 99% of the time as the execution plan never prescribed any of the available indices.

    Someone has suggestions on how to better 'control' bind variables?

    Hello

    Don't you think that 'OR' Conditions are necessary to check for Null, where the binding variable is NULL or not.

    I think that rather than running the query from the front to FB, try to convey the values of some MS and run this query in the procedure, the extraction from the point of view Design coding application. Never fire the query of the frontal part.

    To come to the problem.

    SELECT co.ref_num, co.forename, co.surname, co.dob, a.address, a.postcode,
    Co.ni_num
    ADDRESS, contact co
    WHERE co.ref_num = a.ref_num
    AND (: 1 co.forename IS NULL or =: 2)
    AND (: 3 co.surname IS NULL or =: 4)
    AND (: 5 a.postcode IS NULL or =: 6)
    AND (: 7 a.address IS NULL or =: 8)
    AND (: 9 co.dob IS NULL or =: 10)
    AND (: 11 co.ni_num IS NULL or =: 12)

    Use the procedure.

    Fact exits of the indexes on the tables and stats are updated...?
    Try to predict explain it. ??

    -Pavan Kumar N

  • Parsing sql - cursor parent and child

    Hi all

    What is the parent and child when parsing sql cursor?

    Thank you

    John

    Well, as Anand mentioned you could yourself. Here's a demo of the workaround based. Based on the change of environment, the sliders would be created and will not be shared that I made using the change of parameter of optimizer_mode. This is done in 11201 with the setting optimizer_features_enable on 10201.

    SQL> drop table t purge;
    
    Table dropped.
    
    SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%';
    
    SQL_TEXT
    --------------------------------------------------------------------------------
    select * from t
    
    SQL> alter system flush shared_pool;
    
    System altered.
    
    SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%';
    
    no rows selected
    
    SQL> save a
    Created file a.sql
    SQL> select * from t;
    select * from t
                  *
    ERROR at line 1:
    ORA-00942: table or view does not exist
    
    SQL> create table t(a char);
    
    Table created.
    
    SQL> select * from t;
    
    no rows selected
    
    SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%';
    
    SQL_TEXT
    --------------------------------------------------------------------------------
    select * from t
    
    SQL> select * from T;
    
    no rows selected
    
    SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%';
    
    SQL_TEXT
    --------------------------------------------------------------------------------
    select * from t
    
    SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%';
    
    SQL_TEXT
    --------------------------------------------------------------------------------
    select * from t
    select * from T
    
    SQL> select sql_text,version_count, executions from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%';
    
    SQL_TEXT
    --------------------------------------------------------------------------------
    VERSION_COUNT EXECUTIONS
    ------------- ----------
    select * from t
                1          1
    
    select * from T
                1          1
    
    SQL> column sql_text format a40
    SQL> /
    
    SQL_TEXT                                 VERSION_COUNT EXECUTIONS
    ---------------------------------------- ------------- ----------
    select * from t                                      1          1
    select * from T                                      1          1
    
    SQL> select * from T;
    
    no rows selected
    
    SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%';
    
    SQL_TEXT
    ----------------------------------------
    select * from t
    select * from T
    
    SQL> select sql_text,version_count, executions from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%';
    
    SQL_TEXT                                 VERSION_COUNT EXECUTIONS
    ---------------------------------------- ------------- ----------
    select * from t                                      1          1
    select * from T                                      1          2
    
    SQL> alter session set optimizer_mode=first_rows;
    
    Session altered.
    
    SQL> select * from T;
    
    no rows selected
    
    SQL> select * from t;
    
    no rows selected
    
    SQL> select sql_text,version_count, executions from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%';
    
    SQL_TEXT                                 VERSION_COUNT EXECUTIONS
    ---------------------------------------- ------------- ----------
    select * from t                                      1          1
    select * from test_sharing where id=:a               1          3
    select * from test_sharing where id=1                1          0
    select * from test_sharing where id=99               1          0
    select * from T                                      2          3
    
    SQL> select sql_text, child_number, optimizer_mode, plan_hash_value from V$sql where sql_text like 'select * from t%' or sql_text like 'select * fro
    
    SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_ PLAN_HASH_VALUE
    ---------------------------------------- ------------ ---------- ---------------
    select * from t                                     0 FIRST_ROWS      1601196873
    select * from test_sharing where id=:a              0 ALL_ROWS        3492249339
    select * from test_sharing where id=1               0 ALL_ROWS        3492249339
    select * from test_sharing where id=99              0 ALL_ROWS        2354865636
    select * from T                                     0 ALL_ROWS        1601196873
    select * from T                                     1 FIRST_ROWS      1601196873
    
    6 rows selected.
    
    SQL> alter session set optimizer_mode=first_rows_1;
    
    Session altered.
    
    SQL> select * from t;
    
    no rows selected
    
    SQL> select * from T;
    
    no rows selected
    
    SQL> select sql_text, child_number, optimizer_mode, plan_hash_value from V$sql where sql_text like 'select * from t%' or sql_text like 'select * fro
    
    SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_ PLAN_HASH_VALUE
    ---------------------------------------- ------------ ---------- ---------------
    select * from t                                     0 FIRST_ROWS      1601196873
    select * from test_sharing where id=:a              0 ALL_ROWS        3492249339
    select * from test_sharing where id=1               0 ALL_ROWS        3492249339
    select * from test_sharing where id=99              0 ALL_ROWS        2354865636
    select * from T                                     0 ALL_ROWS        1601196873
    select * from T                                     1 FIRST_ROWS      1601196873
    
    6 rows selected.
    
    SQL> alter session set sql_trace=true;
    
    Session altered.
    
    SQL> alter session set optimizer_mode=first_rows_1;
    
    Session altered.
    
    SQL> select * from t;
    
    no rows selected
    
    SQL> select * from T;
    
    no rows selected
    
    SQL> select sql_text,version_count, executions from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%';
    
    SQL_TEXT                                 VERSION_COUNT EXECUTIONS
    ---------------------------------------- ------------- ----------
    select * from t                                      2          3
    select * from test_sharing where id=:a               1          3
    select * from test_sharing where id=1                1          0
    select * from test_sharing where id=99               1          0
    select * from T                                      3          5
    
    SQL> select sql_text, child_number, optimizer_mode, plan_hash_value from V$sql where sql_text like 'select * from t%' or sql_text like 'select * fro
    
    SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_ PLAN_HASH_VALUE
    ---------------------------------------- ------------ ---------- ---------------
    select * from t                                     0 FIRST_ROWS      1601196873
    select * from t                                     1 FIRST_ROWS      1601196873
    select * from test_sharing where id=:a              0 ALL_ROWS        3492249339
    select * from test_sharing where id=1               0 ALL_ROWS        3492249339
    select * from test_sharing where id=99              0 ALL_ROWS        2354865636
    select * from T                                     0 ALL_ROWS        1601196873
    select * from T                                     1 FIRST_ROWS      1601196873
    select * from T                                     2 FIRST_ROWS      1601196873
    
    8 rows selected.
    
    SQL> select sql_id,sql_text, child_number, optimizer_mode, plan_hash_value from V$sql where sql_text like 'select * from t%' or sql_text like 'selec
    
    SQL_ID        SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_
    ------------- ---------------------------------------- ------------ ----------
    PLAN_HASH_VALUE
    ---------------
    89km4qj1thh13 select * from t                                     0 FIRST_ROWS
         1601196873
    
    89km4qj1thh13 select * from t                                     1 FIRST_ROWS
         1601196873
    
    7gbgb5nzcdcf3 select * from test_sharing where id=:a              0 ALL_ROWS
         3492249339
    
    SQL_ID        SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_
    ------------- ---------------------------------------- ------------ ----------
    PLAN_HASH_VALUE
    ---------------
    0890tcnrf5jsv select * from test_sharing where id=1               0 ALL_ROWS
         3492249339
    
    7hg3cujy0ya0r select * from test_sharing where id=99              0 ALL_ROWS
         2354865636
    
    ahgbnyrbh7bp1 select * from T                                     0 ALL_ROWS
         1601196873
    
    SQL_ID        SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_
    ------------- ---------------------------------------- ------------ ----------
    PLAN_HASH_VALUE
    ---------------
    ahgbnyrbh7bp1 select * from T                                     1 FIRST_ROWS
         1601196873
    
    ahgbnyrbh7bp1 select * from T                                     2 FIRST_ROWS
         1601196873
    
    8 rows selected.
    
    SQL> set pagesize 9999
    SQL> /
    
    SQL_ID        SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_
    ------------- ---------------------------------------- ------------ ----------
    PLAN_HASH_VALUE
    ---------------
    89km4qj1thh13 select * from t                                     0 FIRST_ROWS
         1601196873
    
    89km4qj1thh13 select * from t                                     1 FIRST_ROWS
         1601196873
    
    7gbgb5nzcdcf3 select * from test_sharing where id=:a              0 ALL_ROWS
         3492249339
    
    0890tcnrf5jsv select * from test_sharing where id=1               0 ALL_ROWS
         3492249339
    
    7hg3cujy0ya0r select * from test_sharing where id=99              0 ALL_ROWS
         2354865636
    
    ahgbnyrbh7bp1 select * from T                                     0 ALL_ROWS
         1601196873
    
    ahgbnyrbh7bp1 select * from T                                     1 FIRST_ROWS
         1601196873
    
    ahgbnyrbh7bp1 select * from T                                     2 FIRST_ROWS
         1601196873
    
    8 rows selected.
    
    SQL> set linesize 200
    SQL> /
    
    SQL_ID        SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_ PLAN_HASH_VALUE
    ------------- ---------------------------------------- ------------ ---------- ---------------
    89km4qj1thh13 select * from t                                     0 FIRST_ROWS      1601196873
    89km4qj1thh13 select * from t                                     1 FIRST_ROWS      1601196873
    7gbgb5nzcdcf3 select * from test_sharing where id=:a              0 ALL_ROWS        3492249339
    0890tcnrf5jsv select * from test_sharing where id=1               0 ALL_ROWS        3492249339
    7hg3cujy0ya0r select * from test_sharing where id=99              0 ALL_ROWS        2354865636
    ahgbnyrbh7bp1 select * from T                                     0 ALL_ROWS        1601196873
    ahgbnyrbh7bp1 select * from T                                     1 FIRST_ROWS      1601196873
    ahgbnyrbh7bp1 select * from T                                     2 FIRST_ROWS      1601196873
    
    8 rows selected.
    
    SQL> select child_number, child_address, stats_row_mismatch, optimizer_mode_mismatch
      2  from v$sql_shared_cursor where sql_id='ahgbnyrbh7bp1';
    
    CHILD_NUMBER CHILD_AD S O
    ------------ -------- - -
               0 1A610050 N N
               1 1F148DA4 N Y
               2 1A630C90 Y N
    
    SQL>
    

    You can see an inconsistency in the optimizer_mode resulting in another creation of child cursor. You can try to use the parameter cursor_sharing similar value and bind variables that would also cause child several sliders to create. For the view V$ sql_shared_cursor, check the docs.

    HTH
    Aman...

    PS: Please don't bump up to the thread. This is not support so people are not forced to update immediately. All are volunteers so assume that they would update the thread as and when they have / get time to do.

  • The Parental account for my child's account has been disabled for inactivity and to accept the new terms of use for the xbox update must be parental confirmation.

    The Parental account for my child's account has been disabled for inactivity and to accept the new terms of use for the xbox update must be parental confirmation. I can't do this because even when you type the parental email address in the password recovery, it does not recognize because because it is inactive. I need a Windows Live technician to reactivate the account and I don't know if I should put the email address of the account here for security reasons. My other question is also if you can't reactivate can you switch parental permissions to another account.

    -Thanks, Michael

    Hello

    What version of the Windows operating system is installed on your computer?

    I suggest you to refer to the following article in the Xbox and check if it helps.

    Xbox LIVE connection issues:

    http://support.Xbox.com/en-us/billing-and-subscriptions/Windows-Live-ID/Xbox-Live-sign-in

    If the steps in the section of the Xbox did not help, then it would be better to post the same question in the Windows Live ID portal and forum Xbox to get help. We have a dedicated team to help you with questions of this type.

    Windows Live ID Portal: http://www.windowslivehelp.com/product.aspx?ProductID=10

    Forums Xbox: http://forums.xbox.com/

    Hope the information is useful.

  • Histograms and bind variables

    Hi guys,.
    When a SQL using bind variables histograms afftect the excution plan how?

    For example
    There is a table 'TEST' a column a number, varchar2 (100) b, c. tank (100).
    100000 rows in this table and the 90000 column rows a value is 1, the other value is 2-10 by 100rows.

    Now this column a histogram and a btree index only has on a;

    Here is sample code
    number of a_v var;
    exec: a_v: = 10;

    Select * from test where a =: a_v.

    The plan of the excution is full table scan.

    If I don't use of variable binding. It will scan the index.


    I remember that a document mentioned that "do not use histograms using bind variables.

    But why?

    I disabled same bind variable peeking?


    Thank you guys. Looking forward to your response.

    Longfei Wei says:
    Thanks Centinul this article is useful for me, but it is not explained why histograms do not work well with bind variables.

    Thanks again.

    Longfei,

    Jonathan Lewis article is very good - another look at this article. Histograms peuvent work with bind variable, but the end result is usually not the desired result. Bind variables are used to reduce the number of different execution plans. The histograms are used to find what is supposed to be the best execution plan for the predicates provided and in the case of the bind variables, those are peeked from the bind variable values. Thus, if you have a histogram on a column and for hard analysis of a SQL statement and the most common value in this column is presented in the binding variable - this execution plan is considered by the optimizer to be the 'best' execution plan for the bind variable values provided. Suppose now that instead the less popular value in the column is specified - the optimizer peut produce a very different for the same SQL statement execution plan, which is optimized for the less popular value (this can be a scan of the index systematic range, rather than a full table scan). Now suppose the execution plan may not change when change of variable values bind - if you have a single popular value and many unpopular values, if the analysis lasts is performed with the popular single value, you might find that all subsequent runs of this SQL statement to perform full table scans, even if only a few rows in the table are selected.

    Here's a quick test on the Oracle 11.2.0.2 database to demonstrate:

    CREATE TABLE T1 (
      C1 NUMBER,
      C2 NUMBER,
      C3 VARCHAR2(300));
    
    INSERT INTO
      T1
    SELECT
      *
    FROM
      (SELECT
        ROWNUM C1,
        DECODE(MOD(ROWNUM,100),99,99,1) C2,
        RPAD('A',300,'A') C3
      FROM
        DUAL
      CONNECT BY
        LEVEL <= 1000000)
    ORDER BY
      C2;
    
    CREATE INDEX IND_T1_C2 ON T1(C2);
    
    EXEC DBMS_STATS.GATHER_TABLE_STATS(OWNNAME=>USER,TABNAME=>'T1',CASCADE=>TRUE,METHOD_OPT=>'FOR ALL INDEXED COLUMNS SIZE 254')
    

    The foregoing has created a table with 1 000 000 lines where 99% of the lines have a value of 1 in C2 and 1% have a value of 99, and lines are inserted with a perfect setting in cluster factor because of the ORDER BY clause. A histogram has been created on the indexed column.

    Let's try a test, we'll search a unpopular value 2 for the connection variable:

    VARIABLE N1 NUMBER
    EXEC :N1:=2
    
    SELECT /*+ GATHER_PLAN_STATISTICS */
      C1,
      C2
    FROM
      T1
    WHERE
      C2 = :N1;
    
    no rows selected
    
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,'ALLSTATS LAST'));
    
    SQL_ID  c7su63uw7nch6, child number 0
    -------------------------------------
    SELECT /*+ GATHER_PLAN_STATISTICS */   C1,   C2 FROM   T1 WHERE   C2 =
    :N1
    
    Plan hash value: 236868917
    
    ------------------------------------------------------------------------------------------------------------
    | Id  | Operation                   | Name      | Starts | E-Rows | A-Rows |   A-Time   | Buffers | Reads  |
    ------------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT            |           |      1 |        |      0 |00:00:00.01 |       3 |      1 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| T1        |      1 |   5957 |      0 |00:00:00.01 |       3 |      1 |
    |*  2 |   INDEX RANGE SCAN          | IND_T1_C2 |      1 |   5957 |      0 |00:00:00.01 |       3 |      1 |
    ------------------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       2 - access("C2"=:N1)
    

    Thus, there is no selected row, the optimizer predicts that 5 957 lines would be returned and a path to the index has been selected. Path of this index would also be appropriate for the value of the bind variable 1? We will continue the trial, this time by choosing the 99 for the binding variable value:

    EXEC :N1:=99
    SET TIMING ON
    
    SELECT /*+ GATHER_PLAN_STATISTICS */
      C1,
      C2
    FROM
      T1
    WHERE
      C2 = :N1;
    
    ...
    10000 rows selected.
    
    Elapsed: 00:00:05.35
    
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,'ALLSTATS LAST'));
    
    SQL_ID  c7su63uw7nch6, child number 0
    -------------------------------------
    SELECT /*+ GATHER_PLAN_STATISTICS */   C1,   C2 FROM   T1 WHERE   C2 =
    :N1
    
    Plan hash value: 236868917
    
    ---------------------------------------------------------------------------------------------------
    | Id  | Operation                   | Name      | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    ---------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT            |           |      1 |        |  10000 |00:00:00.02 |    1783 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| T1        |      1 |   5957 |  10000 |00:00:00.02 |    1783 |
    |*  2 |   INDEX RANGE SCAN          | IND_T1_C2 |      1 |   5957 |  10000 |00:00:00.01 |     690 |
    ---------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       2 - access("C2"=:N1)
    

    Once more, the optimizer predicts 5 957 lines could be found even if 10,000 rows have been retrieved. Note also that the number of children is always 0. We will continue the trial, this time with the bind variable value of 1:

    EXEC :N1:=1
    
    SET AUTOTRACE TRACEONLY STATISTICS
    
    SELECT /*+ GATHER_PLAN_STATISTICS */
      C1,
      C2
    FROM
      T1
    WHERE
      C2 = :N1;
    
    990000 rows selected.
    
    Elapsed: 00:00:18.78
    
    Statistics
    ---------------------------------------------------
              1  recursive calls
              1  db block gets
         108571  consistent gets
              0  physical reads
             96  redo size
       21958348  bytes sent via SQL*Net to client
         726508  bytes received via SQL*Net from client
          66001  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
         990000  rows processed
    
    SET AUTOTRACE OFF
    

    Because I used AUTOTRACE to prevent 990 000 lines scrolling on the screen, I have to specify the SQL_ID and CHILD_NUMBER to retrieve the execution plan:

    
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR('c7su63uw7nch6',0,'ALLSTATS LAST'));
    
    SQL_ID  c7su63uw7nch6, child number 0
    -------------------------------------
    SELECT /*+ GATHER_PLAN_STATISTICS */   C1,   C2 FROM   T1 WHERE   C2 =
    :N1
    
    Plan hash value: 236868917
    
    ---------------------------------------------------------------------------------------------------
    | Id  | Operation                   | Name      | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    ---------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT            |           |      1 |        |  10000 |00:00:00.02 |    1783 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| T1        |      1 |   5957 |  10000 |00:00:00.02 |    1783 |
    |*  2 |   INDEX RANGE SCAN          | IND_T1_C2 |      1 |   5957 |  10000 |00:00:00.01 |     690 |
    ---------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       2 - access("C2"=:N1)
    

    Who can be the execution plan that was used because it shows that 10,000 rows have been retrieved. We will try again, this time with CHILD_NUMBER 1:

    
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR('c7su63uw7nch6',1,'ALLSTATS LAST'));
    
    SQL_ID  c7su63uw7nch6, child number 1
    -------------------------------------
    SELECT /*+ GATHER_PLAN_STATISTICS */   C1,   C2 FROM   T1 WHERE   C2 =
    :N1
    
    Plan hash value: 3617692013
    
    ------------------------------------------------------------------------------------
    | Id  | Operation         | Name | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    ------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT  |      |      1 |        |    990K|00:00:00.83 |     108K|
    |*  1 |  TABLE ACCESS FULL| T1   |      1 |    988K|    990K|00:00:00.83 |     108K|
    ------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       1 - filter("C2"=:N1)
    

    The foregoing shows the actual plan that has been used. Sharing the adjustment slider (first available with Oracle Database 11.1) is reached and forced to re-evaluate the execution plan to avoid a very slow recovery through the index - which won't happen before 11.1 database Oracle.

    Just to illustrate:

    ALTER SESSION SET OPTIMIZER_FEATURES_ENABLE='10.2.0.4';
    
    VARIABLE N1 NUMBER
    EXEC :N1:=2
    
    SELECT /*+ GATHER_PLAN_STATISTICS */
      C1,
      C2
    FROM
      T1
    WHERE
      C2 = :N1;
    
    no rows selected
    
    Elapsed: 00:00:00.00
    
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,'ALLSTATS LAST'));
    
    SQL_ID  c7su63uw7nch6, child number 2
    -------------------------------------
    SELECT /*+ GATHER_PLAN_STATISTICS */   C1,   C2 FROM   T1 WHERE   C2 =
    :N1
    
    Plan hash value: 236868917
    
    ---------------------------------------------------------------------------------------------------
    | Id  | Operation                   | Name      | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    ---------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT            |           |      1 |        |      0 |00:00:00.01 |       3 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| T1        |      1 |   5957 |      0 |00:00:00.01 |       3 |
    |*  2 |   INDEX RANGE SCAN          | IND_T1_C2 |      1 |   5957 |      0 |00:00:00.01 |       3 |
    ---------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       2 - access("C2"=:N1)
    

    Note in the above that the CHILD_NUMBER is now 2.

    Continues:

    EXEC :N1:=99
    SET TIMING ON
    
    SELECT /*+ GATHER_PLAN_STATISTICS */
      C1,
      C2
    FROM
      T1
    WHERE
      C2 = :N1;
    
    10000 rows selected.
    
    Elapsed: 00:00:05.31
    
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,'ALLSTATS LAST'));
    
    SQL_ID  c7su63uw7nch6, child number 2
    -------------------------------------
    SELECT /*+ GATHER_PLAN_STATISTICS */   C1,   C2 FROM   T1 WHERE   C2 =
    :N1
    
    Plan hash value: 236868917
    
    ---------------------------------------------------------------------------------------------------
    | Id  | Operation                   | Name      | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    ---------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT            |           |      1 |        |  10000 |00:00:00.02 |    1783 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| T1        |      1 |   5957 |  10000 |00:00:00.02 |    1783 |
    |*  2 |   INDEX RANGE SCAN          | IND_T1_C2 |      1 |   5957 |  10000 |00:00:00.01 |     690 |
    ---------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       2 - access("C2"=:N1)
    

    The CHILD_NUMBER is always 2.

    Continues:

    EXEC :N1:=1
    
    SET AUTOTRACE TRACEONLY STATISTICS
    
    SELECT /*+ GATHER_PLAN_STATISTICS */
      C1,
      C2
    FROM
      T1
    WHERE
      C2 = :N1;
    
    990000 rows selected.
    
    Elapsed: 00:00:16.91
    
    Statistics
    ---------------------------------------------------
              0  recursive calls
              0  db block gets
         175927  consistent gets
              0  physical reads
              0  redo size
       21958348  bytes sent via SQL*Net to client
         726508  bytes received via SQL*Net from client
          66001  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
         990000  rows processed
    
    SET AUTOTRACE OFF
    
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR('c7su63uw7nch6',2,'ALLSTATS LAST'));
    
    SQL_ID  c7su63uw7nch6, child number 2
    -------------------------------------
    SELECT /*+ GATHER_PLAN_STATISTICS */   C1,   C2 FROM   T1 WHERE   C2 =
    :N1
    
    Plan hash value: 236868917
    
    ---------------------------------------------------------------------------------------------------
    | Id  | Operation                   | Name      | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    ---------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT            |           |      1 |        |    990K|00:00:01.63 |     175K|
    |   1 |  TABLE ACCESS BY INDEX ROWID| T1        |      1 |   5957 |    990K|00:00:01.63 |     175K|
    |*  2 |   INDEX RANGE SCAN          | IND_T1_C2 |      1 |   5957 |    990K|00:00:00.68 |   67932 |
    ---------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       2 - access("C2"=:N1)
    

    The foregoing is the execution plan for CHILD_NUMBER 2 - notice that this time he reports 990 000 recovered lines, it's the execution that was used - adaptive cursor sharing plan do not have take effect and force the re-evaluation of the implementation plan - implementation plan has NOT been changed for a full table scan. That's the risk you take if you allow histograms on columns that have an uneven distribution of values and bind variables are used in the WHERE clause that refers to the column.

    Charles Hooper
    Co-author of "Expert Oracle practices: Oracle Database Administration of the Oak Table.
    http://hoopercharles.WordPress.com/
    IT Manager/Oracle DBA
    K & M-making Machine, Inc.

  • The use of bind variables in dynamic query created for Ref Cursor

    Hello

    I'm in a situation where there is a Ref cursor to which the query is built execution based on a loop. This is why the number of links would be known until the program runs.
    The application is currently using literals instead of bind variables.

    code snippet of the above is
    strSql: = "select * from emp where 1 = 1 and ().

    loop cursor1
    If cond is true then
    strSql = strSql | "ename = ' |" Cursor1.ColumnName;
    end loop;

    Open cursor2 for strSql;

    How to use links in the example above.

    sb92075 wrote:

    user13019948 wrote:
    Hello

    Here is the code I have my trying to change literal-based link to the base.

    What do you mean by "based bind?

    who, what, how determines the values to be 'bound '?

    He's referring to the coding style. He is currently using concatenated literal, and the goal is to change it to use the bindings.

    If I understand this it is known as method 4 dynamic SQL and requires DBMS_SQL. There are examples autour but they vary according to the type of statement being generated - SELECT statements require column lists to be parsed, unlike the INSERT/UPDATE/DELETE.

    This came up recently on my current project and I hit a demo. Here a table of names and values accepted procedure and had to build these in a single WHERE clause along the lines of

    AND t_names(i) = t_values(i)
    

    for an undetermined number of elements in the array. For this demonstration, I used a table that we called "attribute" (don't ask) which has columns including 'attribute_id' and 'name', and I need to build a query along the lines of

    select description from attribute where attribute_id = :b1 and name = :b2
    

    by the way '1012' and 'ISIN' respectively. (I use a table better and after a CREATE statement for her but I have to rush right now, sorry).

    declare
       k_sql_base        constant varchar2(500) := 'select description from attribute';
    
       t_names           constant varchar2_t := varchar2_t('attribute_id',  'name');
       t_values          constant varchar2_t := varchar2_t('1012',          'ISIN');
    
       l_sql             varchar2(500) := k_sql_base;
       l_rows_fetched    integer := 0;
       l_value           varchar2(4000);
    
       l_cursor_handle   integer;
    
    begin
       -- Construct the SQL statement with column names and bind variables e.g.
       -- 'select description from mars.attribute where attribute_id = :b1 and name = :b2'
       for i in t_names.first .. t_names.last loop
          l_sql := l_sql ||
             case i
                when t_names.first then ' where ' else ' and '
             end ||
             t_names(i) || ' = :b' || i;
       end loop;
    
       dbms_output.put_line('SQL statment = ' || l_sql); 
    
       -- Parse the statement we built above (the remaining steps require a parsed cursor):
       l_cursor_handle := dbms_sql.open_cursor;
       dbms_sql.parse(l_cursor_handle, l_sql, dbms_sql.native);
    
       -- Associate the 1st column of output with variable l_value - required for SELECT statements:
       -- (actually the 3rd param here 'column' seems to be only used to get a datatype, in this case we want a string -
       -- dbms_sql.column_value actually extracts the value into a specified variable, which can be different.
       -- All examples in the documentation pass a local variable without further comment, so not entirely clear what this does other than set the output datatype.)
       dbms_sql.define_column(l_cursor_handle, 1, l_value, 4000);
    
       -- Now go through values array binding actual values to :bn variables in the cursor (similar to USING clause of EXECUTE IMMEDIATE)
       for i in t_values.first .. t_values.last loop
          dbms_sql.bind_variable(l_cursor_handle, ':b'||i, t_values(i));
          dbms_output.put_line('Bound :b'||i || ' as ' || t_values(i));
       end loop;
    
       -- Open the cursor and fetch the result (no loop here because we are expecting a single-row result):
       l_rows_fetched := dbms_sql.execute_and_fetch(l_cursor_handle);
    
       -- 'Returns value of the cursor element for a given position in a cursor'
       -- Copy the value of column 1 to variable l_value (has to match
       -- dbms_sql.column_value(l_cursor_handle, 1, l_value);
       dbms_sql.column_value(l_cursor_handle, 1, l_value);
    
       dbms_output.put_line('Result = ''' || l_value || '''');
    
       dbms_sql.close_cursor(l_cursor_handle);
    end;
    

    Hope that helps...

  • How is a parent and child, rights and roll determind in the script

    How is a parent and child, rights and roll determind in the script as an exe of java or xml. It's first and second user and which assings these rolls? thanx

    Hello

    Thanks for posting your question in the Microsoft Community.

    Sinc you want to determine the parent and the child rights usings script as an exe of java or xml, the question you posted would be best suited in the MSDN Forums. I would recommend posting your query in the MSDN Forums for further assistance:

    MSDN forums

  • Bind variables and dates

    I am writing a process to delete records based on dates.

    Here is the chart:

    Column name Data type Nullable Default Primary key
    IDNUMBERNO.-1
    CT_NAMEVARCHAR2 (100)Yes--
    CT_CATEGORYVARCHAR2 (100)Yes--
    BASE_PTSNUMBERYes--
    PROD_PTSNUMBERYes--
    REF_PTSNUMBERYes--
    START_DATEDATEYes--
    END_DATEDATEYes--
    CREATED_ONDATEYes--
    CREATED_BYVARCHAR2 (50)Yes--
    UPDATED_ONDATEYes--
    UPDATED_BYVARCHAR2 (50)Yes--

    start_date and end_date are the fields of date key.

    The query will remove the dates with specific start and end dates.  The question I have, is that I get a ORA-01858: a non-digit character was found here where was waiting for a digital error while the query is running.

    remove from ct_point_values

    where start_date =: P4_START_DATE_V

    and end_date =: P4_END_DATE_V

    If I run the query in the sql window, no problem:

    remove from ct_point_values

    where start_date =' 01 / 01/2014 '

    and end_date = 31 December 2014"

    Find the query with the works of values hard-coded.  Links to fail.  I tried casting and to_char to_date variations with no luck.

    One thing that I notice, is that when I go to enter my bind variables in the sql workshop, the fields are pre-populated with this:

    1 & amp; #x2F 1 & amp; #x2F; 2014

    12 & amp; #x2F 31 & amp; #x2F; 2014

    01/01/2014 and 31/12/2014.  I found that the only element relates to this suggests that this is a possible bug:

    SQL Bind Variables workshop - Date issues

    Any thoughts on how to address this issue, or is it really a bug?

    I run on Apex 4.2, 11g.

    Thank you!

    Hello

    I guess that these dates come from elements on the page to which the user can select a range of dates.

    These fields have a custom format mask?

    What seems to be the case for me, is that these fields have an explicit format mask (for example: DD/MM/YYYY) but the default database/session format mask is something different (e.g. DD-MON-YYYY).

    I suppose also that the issue in the SQL workshop isn't something related.

Maybe you are looking for

  • ITunes does not sync Apple podcast app with my Nano

    iTunes does not synchronize my Apple podcast app, with my ipod nanos podcasts. The result is that if I'm half listening to a podcast on my ipod nano, and then use the usb cable for syncing with itunes, then connect my iphone 5 via the usb cable and s

  • No signature during shipping or answering

    my signature (html file) is not inserted when you compose a new message, not when you reply to or forward a mail. Signature also inserted must transfer or respond. How to solve it? TX, Koen

  • Satellite R - battery use

    Hello I just bought this new computer and I want to assure you that my battery lasts as long as possible. For now, I took what I have my computer plugged in most of the time. Is this a good idea? I am afraid that if I put in, it will get used very qu

  • Workstation XW4300: xw4300 will not work with the recommended graphics card (Nvidia Quadro FX 3400)

    I installed a graphics card hoping to update my computer.  The Nvidia Quadro FX 3400 was the highest assigned graphics card recommended for the workstation xw4300 system HP specifications page.  My system has a 460W power supply and I connected the c

  • HP Pavilion dv6-3121: start/restart problem

    Hello everyone, Yesterday I installed the Intel PROSet/wireless software from the utility to update successfully, on my laptop computer hp laptop pavilion entertainment dv6-3121. After successful installation, I restarted my computer. Since then, my