The adaptation and Pl/SQL cursor sharing

Hello

I have this database:

NLSRTL11.2.0.1.0Production
Oracle Database 11g Enterprise Edition11.2.0.1.064 bit Production
PL/SQL11.2.0.1.0Production
AMT for Solaris:11.2.0.1.0Production

I'm testing the queries and adaptive cursor sharing. I have a table T1 that is created by selecting all object. It has additional is NOT NULL ID of the column that is PK and is filled through sequence. It has a regular index (OBJECT_TYPE, OBJECT_NAME). Statistics are collected on the T1 table and its indexes.

Total of T1 lines and are 1065951.

I have run this test in SqlPlus:

ID of the VARIABLE NUMBER;

EXECUTE: id: = 10;

SELECT COUNT (*) FROM t1 WHERE id <: id;

So I check the instruction in v$ sql and the execution plan and I can see that the plan is:

SQL_ID, 3m2qaytqgk9jt, number of children 0

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

Select COUNT (*) from t1 where id <: id

Hash value of plan: 212448250

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

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

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

|   0 | SELECT STATEMENT |       |       |       |   193 (100) |          |

|   1.  GLOBAL TRI |       |     1.     6.            |          |

|*  2 |   INDEX RANGE SCAN | PK_T1 | 99999.   585K |   193 (1) | 00:00:03 |

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

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

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

2 - access("ID"<:ID))

Second test:

ID of the VARIABLE NUMBER;

EXECUTE: id: = 1000000.

SELECT COUNT (*) FROM t1 WHERE id <: id;

Execution plan:

SQL_ID, 3m2qaytqgk9jt, number of children 1

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

Select COUNT (*) from t1 where id <: id

Hash value of plan: 1953966236

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

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

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

|   0 | SELECT STATEMENT |       |       |       |   559 (100) |          |

|   1.  GLOBAL TRI |       |     1.     6.            |          |

|*  2 |   FULL RESTRICTED INDEX SCAN FAST | PK_T1 |  1000K |  5859K |   559 (2) | 00:00:07 |

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

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

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

2 - filter("ID"<:ID))

Output:

SQL > SELECT sql_id, child_number, executions, 'IS_BIND_SENSITIVE', 'IS_BIND_AWARE', 'IS_SHAREABLE' OF V$ SQL WHERE SQL_ID = "3m2qaytqgk9jt";

THE EXECUTIONS OF CHILD_NUMBER SQL_ID I I I

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

3m2qaytqgk9jt 0 2 O N N

1 3 3m2qaytqgk9jt Y Y Y

As we can see it Adaptive cursor sharing has been used and in both cases the appropriate execution plan has been used.

When I run test with PL/SQL block, however, I don't see the use of extended cursor sharing. Could you please help understand why?

The test is (I used deliberately < = in order to create the new parent cursor):

DECLARE

PID NUMBER;

CNT PLS_INTEGER;

BEGIN

BECAUSE me in 1... 10 LOOP

IF i IN (2, 4, 6, 10) THEN

PID: = round (dbms_random.value (1, 5000));

ON THE OTHER

PID: = round ((100000, 1600000) dbms_random.value);

END IF;

dbms_output.put_line ('ID: ' | pid);

COUNT (*) of SELECT INTO cnt FROM t1 WHERE id < = pid;

END LOOP;

END;

/

Output of this is:

ID: 396582

ID: 2584

ID: 560405

ID: 3275

ID: 827442

ID: 4515

ID: 167771

ID: 652411

ID: 512147

ID: 230

As we can see some ID values are good candidates for INDEX BEACH, others are for the INDEX FAST FULL SCAN. However, I am only a child cursor for my parents:

SQL > SELECT sql_id, child_number, executions, 'IS_BIND_SENSITIVE', 'IS_BIND_AWARE', 'IS_SHAREABLE' OF V$ SQL WHERE SQL_ID = "6xh03mm87nmu3";

THE EXECUTIONS OF CHILD_NUMBER SQL_ID I I I

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

0 10 6xh03mm87nmu3 Y N Y

SQL >

Please pay attention to the value for IS_BIND_AWARE, who is with my first child 0. So no other children were created. Why in PL/SQL, it behaves differently and how can we enjoy the cursor of adaptation in this context?

Thank you!

My immediate thoughts were under cover PLSQL optimizations.

PLSQL_OPTIMIZE_LEVEL has no effect.

To run I had to Board BIND_AWARE and SESSION_CACHED_CURSORS value 0.

Subsequently found Randolf Geist post in the same direction:

Oracle related stuff: Adaptive Cursor Sharing

Tags: Database

Similar Questions

  • I have a mac book pro 2009 model, now when I try to load it, there is no green light on the adapter and the laptop does not charge. Not sure if there is a problem with the card or the battery or the laptop. Kindly help

    I have a Mac book pro 2009 model, when I try to load it it not there no green light on the adapter and he is in charge. Not sure if there is a problem with the adapter or the battery or the laptop. Kindly help... Thank you

    Have you tried:

    Portable Apple computers: Troubleshooting MagSafe adapters - Apple Support

    This is the Office Mac Pro forum. I asked that your post be moved to the MacBook Pro laptop forum.

  • Metric of the influence of the size of the PGA and UGA County cursors

    Hello!

    If I have the right to understand,
    the child cursors County growthing indirectly affects the size of the PGA and UGA,
    If that's true, how to receive absolute metric (* GA, no Shared Pool)?


    Thank you
    Paul

    Published by: Paul on 06.02.2012 21:28

    Hi Paul,.

    To be more precise, I refer to the implicit cursors that are stored in the library cache. Please do not confuse with the cursors that are defined explicitly in pl/sql.

    For each identical sql statement, oracle will create the shared cursor (library cache), if this is the first time that the statement is then executed as said previously it will create the cursor in LB, so is the second time, the same SQL statement is executed then oracle will share already created the cursor to the second statement.
    Under normal circumstances for each identical instruction, there are 1 parent and 1 child of the cursor.

    Consider the example next where the sql statement appears to be the same but do not share already created cursor and therefore it must create a new.

    Session executed following queries:

    Select the name of the employee; -> It is that first time sql is executed, then oracle will open a new cursor. In a specific cursor, you have the code sql and other execution information.

    Session B executed after the request:

    Select the name of the employee; -> Here statement SQL makes sense even with above but this will create a new cursor, so already open for session A will not be shared. Note here that the SELECT is uppercase, then oracle think it's the different statement and thus create a new cursor.

    It's an example where difference in uppercase letter oracle thinks it's a new statement. But there are other schenarios where the same situation occurs.
    Another reason for cursor not shared are in V$ SQL_SHARED_CURSOR.

    Although oracle database running in the situation where the sliders are not shared, then this can lead to performance impact hugh like lock in shared long, shared pool leak memory pool, library catch latch etc.. More important, which will require another cursor important to eliminate memory to place a new

    I hope you already know, what is analysis difficult. If this increase the situation of hard analysis, which may further affect the performance.

    Let me know in case of doubts

    Concerning

    Published by: 909592 on 7 February 2012 13:46

    Published by: 909592 on 7 February 2012 13:49

  • Why get ORA-00942 during the validation of PL/SQL cursor

    The database is 10 gr 2.

    ST_PKG_UTILITIES contains a procedure called "p_insert_update_person_info".

    The procedure includes a cursor that selects a view 'CDS_CIS_ETHNICITY '.

    I am logged in as the owner of the schema of the package. The view lies in another schema, but I have the right to SELECT on the view.

    When I try to compile the package, I get "ORA-00942: table or view does not exist", pointing to the CDS_CIS_ETHNICITY view.

    However, if I SELECT directly from the view using a SQL window, it returns information without problem.

    Code view is a SELECT statement on a table across a db_link. However, given that I can select directly from the view, I am not clear why I would get the error because the view is selected, within PL/SQL.

    Note that the table was originally, on the same server that the schema that I am now, so no db_link was necessary. When the schema of the table has been moved to a new server, we added the db_link. However, the package was never changed, we were careful to reproduce the names of objects that are used by the package, when building the db_link.

    Ideas on this issue would be appreciated.

    Thank you
    VP

    Published by: user618800 on December 9, 2008 14:53

    Hello

    Grant privileges directly to the owner of the whole.

    Looks like the privileges that you have about this point of view have been granted to a role, and the owner of the package has this role.
    Roles do not count inside stored procedures. You must have privileges granted directly to the owner (or to the PUBLIC, which probably does not apply in this case).

  • Windows 7 Aero does not work after the computer and Lync 2010 screen sharing session force shutdown

    Hi guys,.

    I can't activate Aero, my theme is stuck on Basic after that I got a power issue and forced stop running Lync 2010 screen sharing (this disables Aero but it turns on when the sharing is stopped).

    I'm running Windows 7 Ultimate x 64 on a workstation with the following specifications:

    CPU: AMD Phenom II X 4 955

    RAM: 16GB DDR3 Corsair

    GPU: nVidia GTS 450 (1 GB of GDDR5 memory)

    My Windows experience index is 5.9 (determined by HDD SATAII, the rest scores are higher than 7).

    Troubleshooting I executed before writing these lines:

    • Updated my nVidia drivers
    • Checked the themes and DWM Session Manager services, both started, both the Auto value
    • Ran the store built, the problem cannot be resolved
    • Running the Wizard Microsoft Fix It, he pointed out that my graphics card does not support Aero Glass

    So the GPU is not the problem, I've been running Aero until this problem has occurred.

    Any ideas?

    Thank you!

    Hello

    It is better suited for the IT Pro TechNet public. Please post your question in the TechNet Forum.

    You can follow the link to your question:

    The customers TechNet Lync and devices Forum

    http://social.technet.Microsoft.com/forums/en-us/ocsclients/threads

  • SQL * PLUS command to get rid of the old and new sqls when using and

    Hi all

    If we use "and in" any query sql in SQL * PLUS, we get the OLD and the NEW sqls as below. How can I get rid of them?
    SQL> select n.name,s.value from v$sesstat s,v$statname n where n.STATISTIC#=s.STATISTIC# and n.name in ('physical read bytes','physical write bytes','redo size','redo writes','session pga memory','sorts (disk)','sorts (memory)','sorts (rows)','undo change vector size','temp space allocated (bytes)') and s.sid=&in;
    Enter value for in: 3
    old   1: select n.name,s.value from v$sesstat s,v$statname n where n.STATISTIC#=s.STATISTIC# and n.name in ('physical read bytes','physical write bytes','redo size','redo writes','session pga memory','sorts (disk)','sorts (memory)','sorts (rows)','undo change vector size','temp space allocated (bytes)') and s.sid=&in
    new   1: select n.name,s.value from v$sesstat s,v$statname n where n.STATISTIC#=s.STATISTIC# and n.name in ('physical read bytes','physical write bytes','redo size','redo writes','session pga memory','sorts (disk)','sorts (memory)','sorts (rows)','undo change vector size','temp space allocated (bytes)') and s.sid=33
    
    NAME                                                              VALUE
    ------------------------------------------------------------ ----------
    session pga memory                                              1199976
    physical read bytes                                               90112
    physical write bytes                                                  0
    redo size                                                           200
    redo writes                                                           0
    temp space allocated (bytes)                                          0
    undo change vector size                                               0
    sorts (memory)                                                        0
    sorts (disk)                                                          0
    sorts (rows)                                                          0
    
    10 rows selected.
    TIA,
    JJ

    Hello

    highlight:

    set verify off
    

    Herald tiomela
    http://htendam.WordPress.com

  • How to set up the iMac and macbook pro for sharing

    I have an iMac desktop running a MacBook Pro runningMavericks and El Capitan. I would be grateful someone guide me through the process step by step to be able to share between these two platforms.

    I know that I should probably update the laptop to El Capitan, but don't have the time to do it now.

    I thank everyone for their tips and advice in advance.

    Essentially, you visit preferences system-> sharing and enable file sharing

    How to connect with the file sharing on your Mac - Apple Support

  • Measure the current and voltage using DMM sharing a port

    I want to measure pressure several times on a pcb, where I connect the ports of digital multimeters to the card using simple cards. Switching between the different voltages is done using simple. If the black port of DMM (the second from the top photo) is connected to the Earth to give the measure correct volt.

    And then I want to measure current through different lines. The problem is here. Given that two measurement types share a port, how do I get the correct voltage and current measurement? The second port of top would be grounded, so I can't use the method of measuring the voltage across the line through a resistance with a known value, since then the second port must not be connected to the ground. How can I use the current state of the DMM measurement? How measure current? Are there examples of this? Tried looking through manuals, but could not find the good starting points.

    so I can't use the method of measuring the voltage across the line through a resistance with a known value, since then the second port must not be connected to the ground.

    On all of my games to test I have to mux my land of the signal along with the salvation of my signals.

    All my mux test sets are set up for the topology 2-wire because there is no other way to do it without the weak side of switch also.

  • Photosmart C4140: Using the adapter for SDHC and SDXC CF in Photosmart C4140

    I have a Photosmart C4140 printer and my cameras using SDHC and SDXC memory cards. I read the specs and some info online and it was stated that this printer does not support these cards. I bought a CF Ultimate Digigear adapter that accepts SDHC and SDCX cards for use in a CF Type 2 slot as the slot on the C4140.  I tried one of my SDXC cards and I get an error "memory card" on the LCD of the printer. Then, I tried the SDHC card in this card and it worked. I was able to view the photos on the LCD of the printer. However, when I tried this SDHC card by removing the adapter and re - insert into the CF slot, I started having the 'memory card error '.  I couldn't read this SDHC card in the new CF adapter. What could happen that he would only read the card only once? I checked this SDHC card in my camera and it still works and can store images. Does anyone know of any other CF adapters that can work?

    Info on this CF adapter can be found here:

    http://www.shopdigi.com/product.aspx?pf_id=SDXCF

    I would like any advice or ideas.

    After some trial and error, I discovered that the CF adapter has one slight movement from side to side, as he goes into the card slot see By putting my thumbs on the corners of the card and pushing the adapter in a fluid, non-stop movement, I was able to get the printer to recognize the adapter and the memory card. It takes a little practice.  This CF adapter works fine. Now I can use the cards SDHC and SDXC times with my printer. I need to buy a new printer.

  • remove the adapter write protection and usb/microsd card

    Put a micro sd card into the adapter and since I opened it I'm impossible to delete files, format the drive e., Cup etc. When the drive is disconnected Ican manipulate the files which have been locked with the drive connected. The share in the properties of the drive button is untouchable and I tried some tools to format the troubed drive and nothing has worked so far. It affects all my usb ports no matter where I connect the sd adapter. How can I change the access point so E is not write protected?

    There is a little switch on the side of the SD card. Make sure that it is upward, to the terminals.
  • When playing xbox live and someone turns on the laptop he loses the connection to the server and then resets modem

    when im playing left 4 dead 2 versus and kids turns to the top turn of the page to play counterstrike he says: interruption of the connection to the server and then resets my modem or router

    I had the Charter to come out, they ran the new line and I always have problem help me please

    Hello

    ·         What operating system do you use?

    Step 1:

    I suggest you to update the firmware of the router on the manufacturer's Web site and verify that it helps. For more information on how router update contact your router manufacturer's support site.

    Step 2:

    Try to assign the static IP address for an Xbox 360 and the laptop and check if it helps.

    To assign a static IP address for your laptop:

    one) click Start > Control Panel > network and Internet > network and sharing Center and click on change adapter settings.

    (b) select your network adapter. (if you have more than one list) Right-click on the adapter and choose 'Properties' from the list.

    (c) under "this connection uses the following items," click once on "Internet Protocol Version 4 (TCP/IPv4) to select it and then click on the button 'Properties'.

    (d) click the radio button for "use the following IP address:" enter the static IP address, you want to use in the IP address box.

    (e) press "Tab" when you are finished and that the "Subnet mask" value should automatically populate with the correct value.

    (f) Finally, you will need to enter the IP address of your default gateway and the IP addresses of your favorite servers and auxiliary DNS.

    (g) the default gateway is the IP address of your router. The DNS addresses are usually provided to you by your ISP.

    (h) click on 'OK' to save your changes, and then click 'OK' again on the local area network connection properties window. You have now assigned to your computer a static IP address in Windows

    To assign a static IP for Xbox:

    (a) turn on the console and press "Guide" on the controller to bring up the quick menu.

    (b) go to the 'Settings' tab, then open "System Settings." The dashboard opens and the 'System settings' menu.

    (c) select 'Network settings' in the menu new. Another list of menu options is displayed. Choose "Configure network." This opens the network configuration menu, where you can set a static IP address. Note your IP address, subnet mask and gateway.

    (d) change your settings 'IP' to 'Manual' instead of 'automatic '. This will allow you to manually select your IP address and other settings. It can also erase your current settings, that's why you need to write.

    (e) change the last three digits of the IP address. Enter the same numbers for the subnet mask and the gateway that you saved in step 3. Press 'B' to exit from the menu and save the changes

  • Declining connection wireless adapter and lock up my computer

    I have a Linksys WUSB54G version 4 adapter.

    My computer is running Windows XP, Service Pack 3, which is automatically updated at all times.

    I used the adapter for a year with no problems.

    Suddenly, he began to lose the connection to the Linksys router and then lock up my computer works only a hard reboot turned off.

    When she returns to the top, some or all of my cookies are lost.

    I ran several different security packages, but no virus or other problems have been discovered.

    I uninstalled the adapter and reinstalled.

    The last time, as a result of an article I read on this site, I installed it without the Linksys software, just the drivers.

    If it does not correctly without Linksys utility then continue using the Wireless Manager Windows to connect to the wireless network.

    You have another PC which is connected to the router. Try to install the adapter wireless on the other PC and see if it works on this computer.

  • ADF mobile: how to download a file by using the adapter remains api

    Hello

    I want to download files using the adapter. How would download files like PDFs, images (png, jpg...) etc... Some code would be appreciated.

    Thank you

    Ok

    After days of headaches, there is a way to send files using the adapter and the code above for the side server. Even if it's a big fall in mobile ADF perspective they have no api for this.

    To download a txt file, you can simply copy and paste the text file into a string and have the string supplemented with appropriate limit values and padding values ('\r\n') before and after the string.

    To transfer a binary file, you must convert the file to a base64 string, then put it in the form mentioned above.

    then you can send it as follows:

    restAdapter.send (fileString);

    Don't forget to add the appropriate headers.

    content type

    and

    definitions of values to the limits

  • Help, please! problem with enhanced vmxnet adapter and Exchange 2003 VM

    Hello

    I recently changed internal NIC our Exchange Server 2003 computer flexible to vmxnet virtual improved, with recommendation of Scott Lowe to modify the *.vmx after taking the inventory server.

    I put the server in the inventory and restarted... then went in through the window / VIC and set a static IP address on Local 2 the new map of the NETWORK, as it was called.

    "I get this message from server: IP address, you have entered for this network adapter is already assigned to another adapter ' VMware Accelerated PCNet Adapter," then it goes on to say that it is hidden from network connections because it is not physically in the computer, there may be network problems and I would like to assign a different IP address... etc.

    Image is attached.

    I tried to do a repair of the VMware Tools, and he did install the vmxnet driver.

    What should I do to banish the network confiict etc. - it is causing people to not be able to use Outlook and disable RDP etc.

    Or how can I get rid of the AMD NIC reference? I don't see it in either Device Manager...

    Thank you!!

    PS Web access for Exchange behaves funny too - messages are sometimes sometimes they aren't - and a few times: "HTTP/1.1 503 Service unavailable" messages

    All this has happened after changing the NETWORK type card - there's no indication anywhere where something like this could happen.

    VMX list section of ethernet, perhaps the error is in the vmx file?

    ethernet0. Present = 'true '.

    ethernet0.virtualDev = "vmxnet.

    ethernet0. Features = "15".

    ethernet0.wakeOnPcktRcv = "false".

    ethernet0.networkName = 'network of the VM.

    ethernet0. AddressType = 'vpx.

    Only the added lines were manually names and functions.

    I really need to get this resolved... maybe I should change back to soft?

    I'd be better off using the method KB VMware to change the NETWORK adapter that requires a change to the description of the OS?

    Message edited by tom12010 to add information

    Try this too...

    1. Select start > run.

    2 type cmd.exe, and then press.

    3. at the command prompt, run this command:

    Set devmgr_show_nonpresent_devices = 1

    4. Enter Start DEVMGMT. MSC and press ENTER.

    5. Select discover > show hidden devices.

    6. expand network adapters (select the plus sign next to the entrance of network adapters)

    7. right click on the adapter and then dimmed network choose uninstall.

    8. close the Device Manager.

  • Intel wifi adapter xps m2010 disabled in Device Manager and in the network and sharing Center

    Original title: intel wifi adapter xps m2010

    for some reason any my intel pro wireless network adapter not turn on using the shortcut keys or by selecting with the mouse. Says its disabled in device in network and sharing Center Manager yet it does give me the option to activate it. Im confused

    Hi pillowgod,

    1. When did you start to question?

    2. you remember to make changes to the computer before this problem?

    You can check the following link and try to run the manual Intel WiFi diagnostic tool to check the functionality of your WiFi adapter.

    http://www.Intel.com/support/wireless/WLAN/sb/CS-025780.htm

    You can also try uninstalling and reinstalling the Intel wireless card and check.

    a. Click Start and type in Device Manager in the start search and press ENTER.

    b. expand the network adapters in the Device Manager

    c. right-click on the device, and then click Properties

    d. click on the driver tab and click on uninstall the drivers and click OK.

    e. restart the computer and check.

    You can also see the Intel Web site and try to download the latest version of the card wifi drivers.

    http://Downloadcenter.Intel.com/default.aspx

    You can also check out the link:

    http://www.Intel.com/support/wireless/WLAN/sb/CS-025807.htm

    Hope this information is helpful

Maybe you are looking for

  • Is it the fault of the user?

    while I was sitting at the computer, it is Cable flex suddenly started burning and melted part of the keybord then Panel, I took the battery and took it to the service. This guy said it's because of short circuit and he sent to the main service in my

  • Bluetooth kit Satellite A300 with Windows XP

    How will I know if my Satellite A300 is equipped with a bluetooth module? It has a Wi - Fi connection and I pay with bluetooh but when I installed Win XP (it comes with Vista) and install the bluetooh monitor, nothing happened in the Panel. I don't s

  • GPIB bus schedule

    Hello I'm new to programming level of registry GPIB. I have some experience in GPIB, but my previous experience was using more higher level programming.  I try to control the GPIB bus with my test Board, which consists of a CPU + NAT9914, as well as

  • When you connect 1 or several external USB drives, why is the letter a * shoot?

    When you connect 1 or several external USB drives, why is the letter a * shoot? Referencing external drives through library (Windows V7) becomes a really shiny, totally useless feature without consistency of drive letter. Or unnecessary to be a desig

  • Addition of EM12cR3 to srvctl Oracle restart

    Configuration of the standalone company Manager:Grid infrastructure 12.1.0.3The repository database 11.2.0.4Enterprise Manager 12.1.0.3Oracle Linux 6.3I installed IM and a database, all components have been added to srvctl.Then, I installed Enterpris