Hard Parse or Soft Parse ?

Hi Experts,
If we execute a SELECT statement in SQL*PLUS by passing the value using ampersand operator, whether hard parsing will occur or soft parsing ?
SQL> select last_name from employees where department_id = &dept_no;
Enter value for dept_no: 100
old   1: select last_name from employees where department_id = &dept_no
new   1: select last_name from employees where department_id = 100
SQL> select last_name from employees where department_id = &dept_no;
Enter value for dept_no: 110
old   1: select last_name from employees where department_id = &dept_no
new   1: select last_name from employees where department_id = 110
When I am executing V$SQL, for each different value I am seeing different SQL_ID. Please explain on this.
Many thaks in advance for your help.
Cheers,
Suri

hi ,
the best way to check for for hard parse and soft parse is by querying the data dictionar view v$sqlarea . There is a column called parse_counts(not sure of the name). the moment you execute a query , a row is reflected in this view.
for eg , when you query
select * from emp where empno=101,
select * from emp where empno=102,
select * from emp where empno=103,
query the v$sqlarea  with a filter predicate on the sql_text . i.e  select * from v$sqlarea where sql_text like  '%select * from emp %'.
And then try querying the emp table using bind variable,
select * from emp where empno=:x; -- pass 101 ,102,103
No new rows are formed in the v$sqlarea,rather the parsed_count keeps on increasing , contrary to the above queries(without using bind variables in which each query is new to the parser).
@Gurus : in 11g , i  have observed that all queries are converted to make you of bind variables .I knew that this was the implicit behaviour of plsql ,but now have they enhanced the sql engine too ?
Thanks
Rahul

Similar Messages

  • Low Execute to Parse % and high soft parse %

    Hello Folks
    I am working on oracle 10g release2 on HP-UX
    After going through awr reports observed it have low Execute to Parse % but high soft parse % (Instance Efficiency Percentages)
    so cannot say issue with less use of bind variables,then what is cause of Execute to Parse %
    searched sites like ask.tom,burselon counsulting etc as usual they had given generic/diplomatic(escaping) replies on this
    like due to problem in application code,ineffecient sharing ,due to problem in database parameters etc
    without any clear indication for cause and solution like if some database parameters not set properly then should say which database parameters can be checked,cause due to more parsing and less execution
    please share if you had faced such issue and any suggestions to solve this
    examples why this could happen ,like possibilities in application code
    Thanks

      Load Profile
                                              Per Second       Per Transaction
                   Redo size:             11,685.79              3,660.98
                   Logical reads:             71,445.74             22,382.86
                   Block changes:                 70.89                 22.21
                   Physical reads:                 58.63                 18.37
                   Physical writes:                  2.80                  0.88
                   User calls:                652.93                204.55
                   Parses:                 48.39                 15.16
                   Hard parses:                  0.33                  0.10
                   Sorts:                  6.90                  2.16
                   Logons:                  0.23                  0.07
                   Executes:                 52.71                 16.51
                   Transactions:                  3.19
                % Blocks changed per Read:    0.10    Recursive Call %:    30.48
                Rollback per transaction %:    2.57       Rows per Sort:    29.66
        Instance Efficiency Percentages (Target 100%)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 Buffer Nowait %:  100.00       Redo NoWait %:  100.00
                 Buffer  Hit   %:   99.92    In-memory Sort %:  100.00
                 Library Hit   %:   98.47        Soft Parse %:   99.32
                 Execute to Parse %:    8.19         Latch Hit %:   99.63
                 Parse CPU to Parse Elapsd %:   89.90     % Non-Parse CPU:   99.62There rdbms performs approximately 48 soft parse per second ,Soft Parse % and Library Hit very close to 99 it means there main part of sql are shared.Also here user calls similar high per second but executions less,however you should be try minimizing soft parsing.I do not know exactly for which interval you get this report but Execute to Parse % indicate that when executing query oracle can not find early cursor handles(open or closed) but it can find sql text and plan information from shared pool according hash values,in this case oracle perform soft parse again.In your case you also investigate shared pool size/fragmentation.To avoid little Execute to Parse % you can increase SESSION_CACHED_CURSORS or implement CURSOR_SPACE_FOR_TIME.So refer documentation and find how to use these parameters.

  • Parse CPU to Parse Elapsd %:  = 0.01

    Hello;
    my database 11.1.0.7 the AWR report shows me the following measures and I need your advices in how to increase the DB performance.
    Instance Efficiency Percentages (Target 100%)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Buffer Nowait %: 99.99 Redo NoWait %: 98.26
    Buffer Hit %: 99.96 In-memory Sort %: 100.00
    Library Hit %: 85.72 Soft Parse %: 77.76
    Execute to Parse %: 49.00 Latch Hit %: 99.87
    Parse CPU to Parse Elapsd %: 0.01 % Non-Parse CPU: 93.44
    Top 5 Timed Foreground Events
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Avg
    wait % DB
    Event Waits Time(s) (ms) time Wait Class
    DB CPU 13,602 51.9
    knpc_anq_AwaitNonemptyQueue 957 4,641 4849 17.7 Other
    direct path read 1,698,099 1,053 1 4.0 User I/O
    log file switch (checkpoint in 5,171 466 90 1.8 Configurat
    Replication Dequeue 146,059 395 3 1.5 Other
    Memory Statistics
    ~~~~~~~~~~~~~~~~~ Begin End
    Host Mem (MB): 63,841.0 63,841.0
    SGA use (MB): 16,960.0 16,960.0
    PGA use (MB): 542.1 475.7
    % Host Mem used for SGA+PGA: 27.42 27.42
    Thanks and best regards
    Ali

    801294 wrote:
    my database 11.1.0.7 the AWR report shows me the following measures and I need your advices in how to increase the DB performance.
    Instance Efficiency Percentages (Target 100%)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Buffer Nowait %:   99.99                                Redo NoWait %:   98.26
    Buffer  Hit   %:      99.96                                In-memory Sort %:  100.00
    Library Hit   %:      85.72                                Soft Parse %:   77.76
    Execute to Parse %:   49.00                            Latch Hit %:   99.87
    Parse CPU to Parse Elapsd %:    0.01              % Non-Parse CPU:   93.44
    Top 5 Timed Foreground Events
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Avg                 
    wait         % DB          
    Event                                               Waits            Time(s)       (ms)        time       Wait Class
    DB CPU                                                                13,602                        51.9          
    knpc_anq_AwaitNonemptyQueue         957              4,641          4849        17.7        Other    
    direct path read                                 1,698,099     1,053          1             4.0          User I/O 
    log file switch (checkpoint in               5,171            466             90           1.8          Configurat
    Replication Dequeue                          146,059         395             3             1.5          Other 
    Memory Statistics
    ~~~~~~~~~~~~~~~~~                       Begin          End
    Host Mem (MB):                   63,841.0     63,841.0
    SGA use (MB):                    16,960.0     16,960.0
    PGA use (MB):                     542.1         475.7
    % Host Mem used for SGA+PGA:         27.42          27.42
    Your title points us at one of the Instance Efficiency ratios - don't bother looking at them, they're basically a waste of time and source of confusion.
    a) How many CPUs in your machine
    b) What's the snapshot interval (we could assume it's the default 1 hour, but it's best to be sure)
    c) Is there any other application or database running on the same machine
    d) Since you seem to have the licence to run AWR, why haven't you checked the ADDM report that goes with this AWR report
    Observations
    A very large fraction of your time is spent on CPU - what is that CPU time doing, and can you do less of it (e.g. check SQL ordered by CPU).
    You are doing a very large number of direct path reads, that means you are using a large amount of CPU to examine a large number of blocks - what process is doing this, and is it necessary at this point. Check SQL ordered by reads, check segments by physical reads and (if it's in 11.1.0.7) segments by direct reads. Those reads are very fast (1ms) so there's a reasonabl chance they're coming from a file-system cache - why do you have a database with a 16GB SGA when the machine has 64GB of RAM ?
    You're spending some time "checkpoint incomplete" - the ADDM would probably tell you to increase the size or number of your log files. This won't make things much faster, but it's very easy to do and a low risk change so you might as well do it/
    I've never seen: "knpc_anq_AwaitNonemptyQueue", so I'd have to check the manuals, MOS, and google for it, but my first though is that an average wait time of 4849 ms might mean that it's a "mostly idle" event with a timeout of 5 seconds, so I'd check v$system event to see how many timeouts have happened compared to number of waits. Since its name includes the word queue, and you also have waits on "Replication Dequeue" (which is another I've not come across before) I'd be inclined to guess that the two waits are some how linked, and that you're doing some sort of replication into this database - and that might explain pressure of the redo log which could be why your log files are too small (or too few).
    If I combine your "% Non-Parse CPU: 93.44" with your CPU time 13,602 seconds, that's about 900 seconds - significant, but not worth pursuing until you've dealt with the direct path reads and more of the 93.44%. (Bear in mind that the CPU spent by Oracle is not the only CPU used by the machine, and those direct path reads may be causing a lot of O/S CPU to be used as well.) (Note: what's the point of a ratio if the first thing you have to do with it to make it useful is to multiply it by something else ?
    http://jonathanlewis.wordpress.com/2006/12/27/analysing-statspack-2/ )
    Strategy
    Find out what's causing the direct path reads - that's probably going to change the whole profile if you can eliminate most of that work.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    Author: <b><em>Oracle Core</em></b>

  • Can I change from hard cover to soft cover after the book is designed?

    Can I change from hard cover to soft cover after the iphoto book is desgned?

    Yes,  Just go to the View all pages window and click on the Change Theme button.  There you will be able to switch size and type of cover.  HOWEVER, just to be on the safe side make a copy of the book beforehand by clicking on it and typing Command+D (duplicate).  Sometimes some of the text might be lost.  It's a possiblity but I've never had it happen. 
    OT

  • Hard Cover To Soft Cover Order ?

    Hi
    Is there a simple way to change my order (before I send it off) from a hard cover choice to a soft cover option ? I thought I had selected soft cover in the first place but I'm only getting a hard cover option when I click to buy book.
    Thanks for any help !
    Mike

    That warning comes up before you tell it what to change to - if you change to a theme with substantially different text layouts you might lose something but just changing from hard cover to soft cover should not - but anything can happen - that is why a current backup is critical to avoid losing computer data including photos - I would update my current backup just before making the change just in case
    But you should not lose anything
    LN

  • How to parse using DOM parser:

    <employee>
         <name>phaneendra</name>
         <age>21</age>
         <company>ABC</company>
         <Authorization>
              <ID>21<ID>
              <Role>Normal</Role>
         </Authorization>
    </employee>
    I am using DOM Parser.Using that parser how can i wil get the <Authorization> node value as
    <Authorization>
         <ID>21<ID>
         <Role>Normal</Role>
    </Authorization>
    thanks in advance

    Since you seem new to using DOM, I'll first give a word of advice.
    Get very familiar with the JavaDocs for things like Document, Element, Node and Attribute. There is much wisdom in those files, especially in the table near the top of the Node interface. Pay particular attention to the meaning of nodeValue for various types on content.
    Using DOM, you get a Document.
    From a Document, you can use the getDocumentElement to get the root element (in your case, the one with a name of "employee").
    From an Element, to get to a child Element with a specific name, use getElementsByTagName or getElementsByTagNameNS (if your elements are coded with NameSpaces).
    Then get the first entry in the resulting list and process it however you like.

  • "Parser module cannot parse the file" - opening .ai files in PS CS3

    Hi,
    I understand Photoshop CS3 can open Illustrator .ai files.
    When inside Photoshop, file/open, select .ai file, I get the following message:
    "Could not complete your request because the parser module cannot parse the file"
    This presents a huge problem because I have original artwork I need to send to the printers, but cannot get into it! It was created by another company on our behalf.
    I have downloaded and installed the Camera RAW 4.5 update and it hasn't helped, the error still occurs.
    Does anyone have any idea what is causing this?
    Many thanks!
    Sally

    If the Illustrator file is correctly saved you can "Place" it in Photoshop. It will appear as a Smart Object.

  • My hard wear and soft wear crashed, did a backup on all my files.When I now open them the are all "preview"!!! How do I get my old documents back? it should be pages, and numbers, ight now I can't work with them

    My hard wear and soft wear crashed, did a backup on all my files.
    When I now open them the are all "preview"!!!
    How do I get my old documents back? it should be pages, and numbers, right now I can't work with them

    Reinstall OS X

  • Cannot place smart object because the parser module cannot parse the file

    Some of my images are saved in Ai for use in my Adobe Ps, but a few of them now give me an error when I try to replace
    a smart object with a saved image from Ai.  I get an error message instead that says "cannot place smart object because the
    parser module cannot parse the file", I have no idea what this means or why it only happens to some images and not all.
    I save everything in the same format and load it into the smart object the same way but some do not work.  If anyone
    knows the solution please help me!!
    Thank you in advance!
    Leila

    As it says: the AI file is not readable.

  • Parse CPU to Parse Elapsd

    HI,
    I have a question our DB is showing Parse CPU to Parse Elapsd %:  is very less 8.37. .
    What should be done to overcome this problem....
    actually we are facing a latch free wait event.....iand i have also identofy hot blocks....but i donlt know waht should be the next step...
    can anybody suggest Pase CPU to Parse elapsed

    When i execute the V$latch_children
    I found that today is also greates no. of sleeps is CACHE BUFFE LRY CHAINS
    LATCH# NAME                                                                
          GETS     MISSES     SLEEPS                                               
            50 ges resource hash list                                              
        601847      24245      22350                                               
            50 ges resource hash list                                              
        617442      24184      22367                                               
            50 ges resource hash list                                              
        749689      23959      22403                                               
    LATCH# NAME                                                                
          GETS     MISSES     SLEEPS                                               
            50 ges resource hash list                                              
        612959      24281      22460                                               
            50 ges resource hash list                                              
        753679      24146      22491                                               
            50 ges resource hash list                                              
        610225      24510      22550                                               
        LATCH# NAME                                                                
          GETS     MISSES     SLEEPS                                               
            50 ges resource hash list                                              
        605734      24468      22570                                               
            50 ges resource hash list                                              
        751314      24771      23073                                               
           157 library cache                                                       
    342286141     281771      25970                                               
        LATCH# NAME                                                                
          GETS     MISSES     SLEEPS                                               
           157 library cache                                                       
    280560658     329228      31768                                               
           156 shared pool                                                         
    463957862     289795      49417                                               
           118 KCL gc element parent latch                                         
    328364965     438291      51954                                               
       LATCH# NAME                                                                
          GETS     MISSES     SLEEPS                                               
           118 KCL gc element parent latch                                         
    443999194     772076      91141                                               
           120 KCL freelist parent latch                                           
    909808383    2092535     128985                                               
           120 KCL freelist parent latch                                           
    903524925    2097603     136115                                               
       LATCH# NAME                                                                
          GETS     MISSES     SLEEPS                                               
            93 cache buffers lru chain                                             
    617430181    2728584     382138                                             
    9568 rows selected.SQL> spool off
    I am really finding difficult to post my query here.....

  • XML parsing error: unexpected parser state

    Hello,
    Yesterday I experienced a roblem I haven't faced before.
    The error title appeared to be "XML parsing error: unexpected parser state". I have a screenshot of the error message that I'll try to upload.

    Screenshot attached.

  • Hard Cover to Soft Cover

    I changed my mind to go from hard cover to soft cover after I was all done. The format changed even though it's the same layout and a lot of material was lost. Can I go back and recover my previous work?

    Do you have a backup?
    You can try going back to the hard cover and see what happens
    What was lost - generally changing only the cover type does not cause problems
    LN

  • Can't use DTD without a "file:" while parsing with SAX2 parser

    Hello,
    I'm using JDK 1.4 with JAXP parser.
    I'm trying to parse an xml document that use a dtd.
    The DTD is in same dir as the xml file.
    If i use a "file:./" before mydtd.dtd like this :
    <!DOCTYPE doc SYSTEM "file:./mydtd.dtd">
    It is working fine, but if i declare it as
    <!DOCTYPE doc SYSTEM "mydtd.dtd">
    I've got a parsing SAX exception saying
    Relative URI "mydtd.dtd" can't be resolved without an URI of document. (translated)
    How to fix that ?

    I think your problem would be solved by using InputSource class. Use the setSystemId method. The relative URI will be resolved relative to the path you provide in this method.

  • Syntax Error with JSON.Parse method to parse SharePoint List Items

    Hi All,
    I want to get SharePoint List data and bind that retrived data to the JQuery Grid Control.
    For this I used SPServices to get the SharePoint List data in SOAP Envelope. Now I need to parse the soap envelope and store the retrieved items in array to pass it to the Grid Control.
    While using the JSON.Parse(resporseText) method, Iam consistenly getting an Syntax Error!
    Could anyone help me with this ?
    Please find the SOAP Envelope I received from SP List as below:
    "<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetListItemsResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/"><GetListItemsResult><listitems xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
    xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
    xmlns:rs='urn:schemas-microsoft-com:rowset'
    xmlns:z='#RowsetSchema'>
    <rs:data ItemCount="2">
    <z:row ows_OBNumber='112211.000000000' ows_Project_x0020_Name='Project 1' ows_MetaInfo='11;#' ows__ModerationStatus='0' ows__Level='1' ows_Title='Project 1' ows_ID='11' ows_UniqueId='11;#{FBBCBCF9-666D-42F9-92D7-67188C51BC9B}' ows_owshiddenversion='1' ows_FSObjType='11;#0' ows_Created='2015-01-12 10:25:06' ows_PermMask='0x7fffffffffffffff' ows_Modified='2015-01-12 10:25:06' ows_FileRef='11;#sites/Lists/Projects/11_.000' />
    <z:row ows_OBNumber='1122343.00000000' ows_Project_x0020_Name='Project 2 ' ows_MetaInfo='12;#' ows__ModerationStatus='0' ows__Level='1' ows_Title='Project 2' ows_ID='12' ows_UniqueId='12;#{0D772B76-68E4-4769-B6FF-6A269F9C7ABD}' ows_owshiddenversion='1' ows_FSObjType='12;#0' ows_Created='2015-01-12 10:33:48' ows_PermMask='0x7fffffffffffffff' ows_Modified='2015-01-12 10:33:48' ows_FileRef='12;#sites/Lists/Projects/12_.000' />
    </rs:data>
    </listitems></GetListItemsResult></GetListItemsResponse></soap:Body></soap:Envelope>"
    Any help on this will be greatly appreciated.
    Thanks In Advance.!

    Hi,
    According to your description, there is an issue when parsing result from the data retrieved using SPServices.
    By default, SPServices returns data as XML format, however, the JSON.parse() method “Throws a SyntaxError exception if the string to parse is not valid JSON”:
    https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse
    To extract the data needed from the response, you can either take the demo below for as a reference:
    http://spservices.codeplex.com/wikipage?title=GetListItems
    Or use the jQuery.parseXML() function:
    http://api.jquery.com/jquery.parsexml/
    Best regards
    Patrick Liang
    TechNet Community Support

  • C parser can't parser UTF-8 ??

    Hello
    I'm working on Sun solaris
    with the version 2 C parser (2/21/00)
    I'm initailizing my parser with encoding set to (oratext*) 0 and calling "xmlparse" with encoding set to (oratext*) 0. So now I should be able to parse a message containing special characters because UTF-8 is the default encoding.
    But then I get the following message:
    LPX-00217: invalid character
    Also, if I want to initialize the parser with encoding set to (oratext*)"UTF-16" or (oratext*)"UTF-8" the initialization fails. (oratext*)"US-ASCII" DOES work.
    Am I mad, or does the parser not support UTF-8 and 16, contrary to the release notes???

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Sander:
    Hello
    I'm working on Sun solaris
    with the version 2 C parser (2/21/00)
    I'm initailizing my parser with encoding set to (oratext*) 0 and calling "xmlparse" with encoding set to (oratext*) 0. So now I should be able to parse a message containing special characters because UTF-8 is the default encoding.
    But then I get the following message:
    LPX-00217: invalid character
    Also, if I want to initialize the parser with encoding set to (oratext*)"UTF-16" or (oratext*)"UTF-8" the initialization fails. (oratext*)"US-ASCII" DOES work.
    Am I mad, or does the parser not support UTF-8 and 16, contrary to the release notes??? <HR></BLOCKQUOTE>
    HI
    I am getting teh same problem which Mr.Sander is facing.
    I am presently working with 2.0.4.0.0 C++ XML parser on solaris 5.8 with oracle 8.1.6 .
    I am not able to parse ISO-8859-1 data with it.I get the following message:
    LPX-00217: invalid character.
    MY ORACLE_HOME is set.Also, if I want to initialize the parser with encoding set
    to (oratext*)"UTF-16" or (oratext*)"UTF-8" the initialization fails. (oratext*)"US-ASCII"
    DOES work.
    Can U pls get back what has gone wrong.
    I do have a confusion where the encoding has to be specified.
    The XML declaration header takes the encoding declarationa also for eg
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    Further more thru the APIs we can initialise the encoding scheme using the API xmlinit()
    What is the significance of using the encoding declaration in the header?\
    Can you help me out in this issue.
    Thanks in advance.
    null

Maybe you are looking for

  • Cannot save, cannot print PDF form in Adobe Reader 9

    I downloaded a PDF form for an application from the internet. It opened in Adobe Reader 9, where I was able to fill out information in the PDF. Some areas required a scroll bar for long lists of information. Now, I cannot save the PDF or else all of

  • 'Some images are missing because they were deleted from the document'

    Hi, I created a document in Pages v5.2 last week and have just opened it and received the following message: 'Some images are missing because they were deleted from the document' When I try and replace the missing images I get the following message:

  • Convert iMovie to QT clip that PC's and Mac's can view

    I am not too familiar with QT and its capabilities and have a question. From one clip of an iMovie of my boys football game I created a 15 sec. QT movie and emailed it to my son. He could open it on his PC but when he sent to his friends who also hav

  • Verbose mode ****

    So it all started a while ago when sleep mode only lasted for 10 seconds after I upgraded to 10.4.9. I read that this was a common problem, so I just shut down at night. About a week ago, the computer kept booting from the gray Apple boot screen stra

  • Equium L300 - Will not install anything other than Microsoft downloads

    Equium L300 updated with Windows 7. I am a novice where PCs are concerned so any help welcomed. My notebook will not install "programmes" (eg Java AVG etc etc) It down loads, ask to run then nothing happens. It used to ! . I have tried just about eve