Are SQLs form compiled in PLSQL?

Hi all

After the right amount of discussion with a number of developers, I'm posting this question.

Are SQL statements in the PLSQL stored in compiled form, procedure as procedural statements or SQLs are compiled in a stored procedure is called?

Thanks in advance.

Kind regards
Alex

Ateet Mehta wrote:

This means, the entrance to the sql engine is exactly the same for 1) static sql fired from 2) static sql and sqlplus inside plsql... ?

We can confirm that static SQL, when compiled in PL/SQL, does not create a cursor pool shared, but that cursor is created only at run time.

Cannot therefore a ' + create cursor + "call to the engine SQL pass a struct already validated/analyze/semantically analyzed, instead of SQL source code?

Don't know how to confirm or deny that the use of tables in v$. I would not say that I can not remember ever having seen such a structure or call the OCI (Oracle Call Interface). It would also be a dangerous and risky interface to the SQL engine to support - that it should rely on the appellant to a valid structure. In addition, what concurrency? The SQL engine to use this structure and the objects referred to in this document, to the shared locks on these objects to prevent any change/withdrawal between where the struct validated/analyze/semantically analyzed was created by the caller (for example, PL/SQL) and received for processing by the SQL engine. If the appellant must also required locks put on the data dictionary.

This approach seems not very reliable for me. She relies heavily on the appellant to spend a working structure for the SQL engine and change the State of the database accordingly to maintain the integrity of the structure for the SQL engine to use.

And even in this case, the SQL engine will always have to use the CBO to determine an execution plan for this struct has received.

So exactly what is the percentage of run time was saved by the presence of the appellant passing this structure to the SQL engine, instead of a source code structure?

If the motor input sql is exactly the same, what is the importance to generate pcode for static sql plsql inside?

Because of things like bind variables. The static SQL in PL/SQL is often not "pure" SQL It contains references to structures and PL/SQL variables. This requires for example bind calls (take a look at the DBMS_SQL package that illustrates the basic principles of the OIC well enough).

which, in my view, is there not any need for syntax and semantic analysis for sql static writtein in plsql, when they are sent to the static sql, unlike sql engine from sqlplus or client application.

I have to disagree on that. I do not see a real performance benefit of such an approach - and IMO it will be not very strong either.

Tags: Database

Similar Questions

  • Oracle Form compile all active SQL rules fails

    Hello

    I finished the steps of Installation of the CCP.
    Now, I'm in the steps of the Installation of the poles.
    RCMP - rules of compilation of SQL, I clicked on "Oracle Form compile all active SQL rules" in the Tools menu bar.
    And I checked the State "process is finished with the error. Here is the error log:

    ---------------------------------------------------------------------------
    RCMP controls custom: Version: UNKNOWN

    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.

    Module LAGENLIB: library to generate controls RCMP
    ---------------------------------------------------------------------------

    Current system time is May 22, 2013 17:52:30

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

    Variable source CLASSPATH successfully...
    LAGENLIB: Input parameters are
    LAGENLIB: Name of the library: LABRSQL
    LAGENLIB: Connect str: jdbc:oracle:thin:@grc.4iapps.com:1541:GRCTEST
    LAGENLIB: The library will be: /ebiz/applmgr/apps/apps_st/appl/xxlaapps/12.0.0/bin/LABRSQL.pld
    ebiz/applmgr/Apps/apps_st/Appl/xxlaapps/12.0.0/bin/LAGENLIB. PROG: line 64: LAGENLIB: command not found
    LAGENLIB: Library Generation failed
    LAGENLIB: Quit smoking with the error...
    /EBiz/applmgr/apps/apps_st/appl/xxlaapps/12.0.0/bin/LAGENLIB
    Program exited with status 1


    ---------------------------------------------------------------------------
    Options, AutoComplete, the request for enforcement.

    Size of the output file:
    0


    End of query options AutoComplete.

    ---------------------------------------------------------------------------
    Simultaneous request ended
    Current system time is May 22, 2013 17:52:30

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

    And I tried the Document link for the solution below. But still am experiencing this problem.
    Compilation of SQL is any mistake when CCP 7.3.1 is installed against database 11g [1078979.1 ID]

    Please suggest me to fix this problem.

    Concerning
    Kumar V

    Thank you very much.

    The problem has been resolved.
    Solution.
    I run the script laconfig.sh once again, then complie all active sql rules, its normally filled.

    Thanks Yasser.

  • I'm filling out a form to transfer license for Adobe Acrobat Pro XI who is transferred to another employee in our company for me. The instructions are the form indicate to attach to a file number. How can I get a case number?

    I'm filling out a form to transfer license for Adobe Acrobat Pro XI who is transferred to another employee in our company for me. The instructions are the form indicate to attach to a file number. How can I get a case number?

    Use a browser that allows cookies and pop-up windows, please contact adobe for hourly pst support by clicking here and, when it is available, click "still need help," https://helpx.adobe.com/contact.html

  • Reader Adobe XI updates last week. Reinstalled this morning. All previous saved pdf files are now forms of words asking the conversion? Creates problems for my business. Help, please?

    Reader Adobe XI updates last week. Reinstalled this morning. All previous saved pdf files are now forms of words asking the conversion? Creates problems for my business. Help, please?

    See http://windows.microsoft.com/en-us/windows/change-file-open-program#1TC=windows-7

    Another method: http://windows.microsoft.com/en-us/windows/change-default-programs#1TC=windows-7

  • What is the area around form elements

    What is the invisible noneditable area around form elements?

    For example if I add a checkbox (small box with a small label next to him) Muse draws a HUGE area dotted around it that affects the positioning of other things on the page (push the footer down, for example).

    The dotted box corner and middle handles, as if it should be resizable, but they are tiny Cross and I cannot "unlock" them.

    I need to make these smaller boxes (or take them away) because every time I added a checkbox to my form he put a bigger and bigger these mysterious boxes around it.

    Any suggestions?

    Thank you

    K.

    Just take a look at the States Panel and activate the various States of an element form/form and you will certainly see the reason: there is room for various notifications.

  • Several areas of form with one button recording

    Hello

    Is it possible to have several areas of form on a single page, with a single button that validates the changes made in all parts of the form save? If so, the forms must be manual forms?

    If this is not possible, or a bad way to go with APEX, what are my options?

    I try to avoid the user having to click through many screens to enter data. Logically each section should be in another table, but I would like to group some of the sections together to reduce the number of pages, users need to navigate to.

    Thanks in advance for your help,
    Johnnie

    Published by: johnniebillings on June 1st, 2009 21:33

    OK, Johnnie - let us know if you need something more on this

    Andy

  • DBMS sql: native compilation

    Salvation;

    We develop several packges in pl/sql.

    In order to spin faster, we decided to compile natively. (don't really know now if it was a good decision!)
    ALTER SESSION SET PLSQL_CODE_TYPE = NATIVE;
    change the package XXX compilation package.
    change the package package YYY compilation;

    After this compilation, SYS. Trows DBMS_SQL (used in our packages) a mistake:
    ORA-29471 dbms_sql access denied

    It works well, if we also compile the SYS. DBMS_SQL natively.
    ALTER SESSION SET PLSQL_CODE_TYPE = NATIVE;
    change the package package sys.dbms_sql compilation;

    Is it safe to do? Is this native compilation a good pratice pl/sql?

    PauloSMO wrote:
    In order to spin faster, we decided to compile natively. (don't really know now if it was a good decision!)
    ALTER SESSION SET PLSQL_CODE_TYPE = NATIVE;

    After this compilation, SYS. Trows DBMS_SQL (used in our packages) a mistake:
    ORA-29471 dbms_sql access denied

    If you have clearly chosen foruse dynamic SQL, you chose to give priority less LOC on the performance. So, why go this route? Precompile your PL/SQL in native C won't make a big difference for the overhead of constantly Assembly and analysis of SQL statements.

    In addition, advice on native compilation are that it is beneficial for pure PL/SQL programs but does not have much of a difference to programs that are controlled by the data. If you use dynamic SQL statements chances are your routines are data-driven (otherwise, what's the point to use dynamic SQL statements?) it seems very little probable that you will see a lot of value to native compilation, although YMMV.

    Cheers, APC

  • How to make the artificial delay in pl/sql forms

    Hi gurus,

    I use
    Forms [32 Bit] Version 10.1.2.0.2 (Production)
    Oracle Toolkit Version 10.1.2.0.2 (Production)
    PL/SQL Version 10.1.0.4.2 (Production)
    Oracle Procedure Builder V10.1.2.0.2 - Production
    In fact I do Bulk SMS sending program using java classes. code works fine in the java platform...

    even class I call oracle forms, but the code executes even less then a second. but I want to stop the execution of a pl/sql stored procedure for 3 seconds until this java class sends sms to the number of the body... and then iterate towards the following.

    for example
      for i in 1..100 loop
          stored_procedure_having_javaclass(org1 ,arg2);
          deley_of_secends(3);
       end loop;
    for this, I tried...
            dbms_look.sleep(3);
    While using this database of anonymous block level it works very well, I think that a stored procedure and then call him on oracle forms, but when to use even in the stored procedure, it gives me error that this function must be declared, as I can't use this feature friendly oracle forms.

    What should I do?
    Thank you
    with regard to:
    Usman noshahi

    Hello

    Grant execute on DBMS_LOCK to PMS.

    Make sure that you are logged in as sys.

    Kind regards
    Alex

    If someone useful or appropriate please mark accordingly.

  • EntityImpl DML - how SQL forms

    Jdev Version: 11.1.1.7.1

    Interested in exploring how the EO form the SQL when it publishes changes to DB - especially in UPDATE mode. I think that there should be a mechanism to see what EO attributes have changed and add selectively to the SQL update.

    Keep thread posted on what I find in my research on this.

    Take a look at:

    OracleSQLBuilderImpl (Oracle Fusion Middleware Java QAnywhere for Oracle ADF Model)

    And if you want to use your custom SQLBuilder:

    http://www.jobinesh.com/2013/02/Customizing-SQL-Builder-class.html

  • Where are the forms in Adobe Draw on iPhone?

    View all Adobe print page:

    If you are working on an iPad, iPad Pro, or the iPhone, tap the icon of forms and select any shape of App or Capture Forms saved in your CC libraries.

    Place two fingers inside the form to move anywhere on the page or rotate. Pinch inside the form to enlarge or reduce its size.

    You can draw around a form of App it draw with a brush, or double click inside the shape stamping machine. Note: You can only stamp, but not forms trace added from libraries CC.

    I use Adobe draw on an iPhone, there is no icon that I can find. The overview is the problem?

    link to the page:

    Use Adobe Illustrator to draw for craft scalable vector drawings that can be edited in Illustrator CC and placed in Photoshop...

    Hey HelpMe.

    This feature is not yet at the draw for the iPhone (it's an error in the tutorial)... but it's coming. Very soon.

    Sue.

  • Several secure areas to form one login

    Hey everybody.

    I need to add in multiple areas secured to a single login form, so that each customer is redirected to his unique secure area with data that it cannot access. Each client has different data, obviously, so I need to create a secure for each area.

    It is, it seems that in the login form, you can only add ONE secure area ID.

    I can't believe that they do not have a simple solution to a big problem. Why would need a secure if the data would not be private for each person?

    Any help is appreciated

    Hello

    Please check the following discussion

    Several areas with a single Login Form

    Re: Several secure areas with shapes that disappear (or a redirect link) if the user is connected

    Let me know if you have any question.

  • Moving a query SQL using XMLELEMENT to PLSQL

    Here is the PLSQL

    DECLARE

    letexte CLOB.

    BEGIN

    with test_table as)

    SELECT VM_REPORT_DATE, quantity, item,.

    (CASE point

    WHEN "VM_HOSTS_NUM" THEN "y_axis_1".

    WHEN "VM_NUMBER" THEN "y_axis_1".

    WHEN "VM_CPU_COUNT" THEN "y_axis_1".

    WHEN "VM_PHYS_MEM" THEN "y_axis_2".

    WHEN "VM_VIRT_MEM" THEN "y_axis_2".

    WHEN "VM_VIRT_MEM" THEN "y_axis_2".

    WHEN "VM_TOTAL_DISK" THEN "y_axis_3".

    WHEN "VM_PROVISIONED_DISK" THEN "y_axis_3".

    ELSE 'y_axis.

    Wser END)

    of VM_CORE unpivot)

    ITEM quantity in (VM_HOSTS_NUM, VM_NUMBER, VM_PHYS_MEM, VM_VIRT_MEM, VM_CPU_COUNT, VM_TOTAL_DISK, VM_PROVISIONED_DISK)

    () where VM_DCNAME = "bc_production")

    SELECT XMLELEMENT ("SERIES", xmlAttributes (as "name", "Line" as 'type', wser as "y_axis"),

    XMLAGG (XMLElement ("point", xmlAttributes (VM_REPORT_DATE as "name", much like "y"))) nominative CASE

    ) NOMINATIVE in letexte from test_table group by point;

    : BC_PROD_DATA: = thetext;

    END;

    The central SQL to generate works however the PLSQL calls for a select statement in each of the SELECT statements.

    I think I should use a slider for the first select statement, but I'm not sure how.

    Thank you

    I had typo. I accidentally pasted twice the first select statement.

    I got it with the following: I didn't need of you getclobvar(), but that would have been helpful, I just seriealized the XML data.

    Thank you

    DECLARE

    letexte CLOB.

    BEGIN

    with test_table as)

    SELECT VM_REPORT_DATE, quantity, item,.

    (CASE point

    WHEN "VM_HOSTS_NUM" AND THEN "

    WHEN "VM_NUMBER" AND THEN "

    WHEN "VM_CPU_COUNT" AND THEN "

    WHEN "VM_PHYS_MEM" THEN "y_axis_2".

    WHEN "VM_VIRT_MEM" THEN "y_axis_2".

    WHEN "VM_VIRT_MEM" THEN "y_axis_2".

    WHEN "VM_TOTAL_DISK" THEN "y_axis_3".

    WHEN "VM_PROVISIONED_DISK" THEN "y_axis_3".

    ELSE 'y_axis.

    Wser END)

    ,

    (CASE point

    WHEN "VM_HOSTS_NUM" THEN "#FF0000".

    WHEN 'VM_NUMBER', THEN '#AA0000 '.

    WHEN "VM_CPU_COUNT" THEN "#770000".

    WHEN "VM_PHYS_MEM" AND THEN "#0000FF".

    WHEN 'VM_VIRT_MEM' THEN ' #0000AA '.

    WHEN "VM_VIRT_MEM" AND THEN "#000077 '."

    WHEN "VM_TOTAL_DISK" AND THEN "#00FF00".

    WHEN "VM_PROVISIONED_DISK" AND THEN "#00AA00.

    ELSE 'y_axis.

    Colorr END)

    of VM_CORE unpivot)

    ITEM quantity in (VM_HOSTS_NUM, VM_NUMBER, VM_PHYS_MEM, VM_VIRT_MEM, VM_CPU_COUNT, VM_TOTAL_DISK, VM_PROVISIONED_DISK)

    () where VM_DCNAME = "bc_production")

    SELECT XMLSERIALIZE)

    CONTENT XMLELEMENT ('data', XMLAGG (XMLELEMENT ("series", xmlAttributes (point as "name", "Line" as the "type", wser as "y_axis", colorr as "color"),

    XMLAGG)

    XMLElement ("point", xmlAttributes (VM_REPORT_DATE as "name", much like "y")) order by VM_REPORT_DATE

    )

    ))

    )

    )

    in the Group test_table letexte by order of point by point.

    : BC_PROD_DATA: = thetext;

    END;

  • Reg - pl sql conditional compilation

    Version details
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Productio
    NLSRTL Version 10.2.0.4.0 - Production
    create or replace package r_dummy_pkg
    is
         procedure proc_table_doesnt_exist;
         procedure proc_valid;
    end;
    /
    
    show err;
    
    create or replace package body r_dummy_pkg
    is
         procedure proc_table_doesnt_exist
         is
              l_count number;
         begin
              select count(*)
              into l_count
              from doesnt_exist_tbl;
         
         end proc_table_doesnt_exist;
         
         procedure proc_valid
         is
         begin
              dbms_output.put_line('Fine');
         end proc_valid;
    end;
    /
    
    show err;
    SQL> @"H:\Raghu\INDEX\cc.sql"
    
    Package created.
    
    No errors.
    
    Warning: Package Body created with compilation errors.
    
    Errors for PACKAGE BODY R_DUMMY_PKG:
    7/3      PL/SQL: SQL Statement ignored
    9/8      PL/SQL: ORA-00942: table or view does not exist
    SQL>
    Updated the my code using conditional Compilation and she got well compiled
    create or replace package r_dummy_pkg
    is
         $if $$rgh_cc $then
         procedure proc_table_doesnt_exist;
         $end
         procedure proc_valid;
    
    end;
    /
    
    show err;
    
    create or replace package body r_dummy_pkg
    is
         $if $$rgh_cc $then
         procedure proc_table_doesnt_exist
         is
              l_count number;
         begin
              select count(*)
              into l_count
              from doesnt_exist_tbl;
         
         end proc_table_doesnt_exist;
         $end
         
         procedure proc_valid
         is
         begin
              dbms_output.put_line('Fine');
         end proc_valid;
    end;
    /
    
    show err;
    SQL> @"H:\Raghu\INDEX\cc.sql"
    
    Package created.
    
    No errors.
    
    Package body created.
    
    No errors.
    SQL>
    I tried activation conditioning block, but I don't understand how
    SQL> alter package r_dummy_pkg compile plsql_ccflags='rgh_cc:true';
    
    Warning: Package altered with compilation errors.
    
    SQL> show err
    ERROR:
    ORA-00907: missing right parenthesis
    
    
    SQL> alter package r_dummy_pkg compile body plsql_ccflags='rgh_cc:true';
    
    Warning: Package Body altered with compilation errors.
    
    SQL> show err
    ERROR:
    ORA-00907: missing right parenthesis
    Is something wrong with the alter, I published? How to make part of the compiled code?

    First of all I don't know how you get:

    SQL> alter package r_dummy_pkg compile plsql_ccflags='rgh_cc:true';
    
    Warning: Package altered with compilation errors.
    
    SQL> show err
    ERROR:
    ORA-00907: missing right parenthesis
    

    I can't reproduce on 10.2.0.4.0 and 11.2.0.1.0:

    SQL> alter package r_dummy_pkg compile plsql_ccflags='rgh_cc:true';
    
    Warning: Package altered with compilation errors.
    
    SQL> show err
    SP2-0564: Object "r_dummy_pkgplsql_ccflags='rgh_cc:true'" is INVALID, it may not be described.
    SQL> 
    

    For errors you need:

    SQL>  select  text
      2    from  user_errors
      3    where name = 'R_DUMMY_PKG'
      4  /
    
    TEXT
    -------------------------------------------------------------
    PL/SQL: ORA-00942: table or view does not exist
    PL/SQL: SQL Statement ignored
    
    SQL> 
    

    Now ' is something wrong with the alter, I published? How to make part of the compiled code? ».

    There is nothing wrong with the ALTER statement. Since when the package was compiled for the first time $$ rgh_cc has not been set to TRUE proc_table_doesnt_exist procedure was not part of compilation - just part of the source code. But as soon as you issue ALTER that defines $$ rgh_cc was true package is recompiled and procedure proc_table_doesnt_exist becomes a part of the compilation. Obviously the compilation fails because the proc_table_doesnt_exist procedure reference table while no.

    SY.

  • Hide the area of a form outside the area another form?

    I use Photoshop CS2 and I want to make sure if I have 2 forms of different fill, mask the area of a shape that is not within the area of the other shape. I made an example to try and make sense-I realize, it's probably quite a basic question, but I can't for the life of understand me! Would be very grateful if someone could explain step by step how to do this, thanks!

    http://img149.imageshack.us/img149/9651/photoshoppathshelpexamp.jpg

    You can use a feature called a clipping mask. In your case, you will place the Red shape on the top layer and the black shape on the bottom layer. Then hold down the ALT key and the cursor in the layers palette between the upper and lower layers. When you see the hand icon change a circle icon double click of your mouse.  This will show the pixels of the layer to the top only where the pixels of the layer below exist.  Thus, the lower layer wants to be your black rectangle surrounded by transparent pixels.

    Paulo

  • How to get to the APEX of the variables within the pl/sql function compiled.

    Hello
    My initial problem is to create the pl/sql code returning the names of columns for my custom calendar report.
    There are 7 columns for each day of the week and I want to make on two rows - all first day of the week, as the word 'Monday' and below (with the BR tag) the date as August 18, 2008 "."
    What I want is to define any additional tags to underline, italic, etc. on the column for which the date is selected for display (I point DATE for this purpose).
    But as the code becomes very complex, I decided to write a function in my pattern that returns the values of the columns defined for the titles.

    What I can't do is the following.
    (1) how to reference a value of element APEX, such that my point DATE? using results of unknown function 'v' ('P4_DATE') v
    (2) how to use tank-date and vice versa, conversion using the format mask, available at the APEX 3.1 already implemented application? So that when I change the date format mask in the application, it would still work.
    10 x and I hope I'm not repeating someone else question.

    Hello

    That's correct - any item (including elements of application) in the session can be used from : nom_element as parameter in a function (or procedure) is defined as the function (or procedure) with PARAMETERS.

    Concerning

    Andy

Maybe you are looking for