pl/sql insert slow

Hello friends,
I have a PL / SQL doing an insert into a table with an average of 1500 documents per minute, but for the record which is about 300,000, this speed decreases gradually, Faza demoranto for a total of 3 500 000 records almost 6 hours, you think it might be slow?

Hugs

Zander

Hello

There are two points here.

1. even if your code is difficult to read (in capital letters and without formatting) I would up the assumption that most of the code could be replaced by a single INSERT statement. This would remove the looping and validations in loops.

2 indexes cause an overload on the DML operations, especially on large tables. This is because the database must maintain the index during the operation, including both read and write operations. You get a double whammy when indexes are so great that they wouldn't fit in the buffer, and the database is using excessive disk IO. You can increase database buffers to account for this, but there are practical limits to this. Another good practice for loading in bulk, especially when you truncate the table, don't load and then later rebuild is to drop or set the index of a table before you as unusable.

Hope this helps
André

Tags: Database

Similar Questions

  • 2 PL/SQL insert new string in the string specified to a specific Position

    Hello

    PL/SQL insert new string in the string specified to a specific Position

    Continuing the previous thread has answered, I would like to know how to cut the data after the underscore ("_").

    Example:

    Old chain: D100_RT

    New string:APPROX100 d.

    Here after, what is there after that execution should be deleted.

    Thank you

    Suppose that the string = D100_RT

    select substr('D100_RT', 1, instr('D100_RT','_')-1 )
    from dual
    
  • SQL running slow

    Hi experts,

    Suite sql running slow (average time elapsed 18 seconds), for me to ok research execution plan

    do you see problems in the execution plan, all wy we can leaving under sql


    Hash value of plan: 1838138027

    ---------------------------------------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    ---------------------------------------------------------------------------------------------------------------
    | 0 | UPDATE STATEMENT. 22 (100) |

    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    | 1. UPDATE | EXTERNAL_ID_ACCT_MAP |
    | 2. TABLE ACCESS BY INDEX ROWID | EXTERNAL_ID_ACCT_MAP | 258. 7224 | 22 (0) | 00:00:01 |
    | 3. INDEX RANGE SCAN | EXTRNL_D_CCT_MP_XCST_CCT_MP_KY | 258. 1 (0) | 00:00:01 |
    ---------------------------------------------------------------------------------------------------------------



    Thank you
    REDA

    Published by: 956212 on August 31, 2012 16:57

    Published by: 956212 on August 31, 2012 16:57

    See [url https://forums.oracle.com/forums/thread.jspa?threadID=863295] how do I post a sql tuning request.

    do you see problems in the execution plan, all wy we can leaving under sql

    Please also provide the SQL section and predicates as well--that may indicate problems such as implicit data type conversion.

    Bottom line - if the estimates in the SQL statement are reasonably correct, there is a very good chance that it is a good plan (given indices and the available paths).
    See http://www.centrexcc.com/Tuning%20by%20Cardinality%20Feedback.pdf

  • How to solve the error ORA-00001 in SQL Insert?

    Hi all, I need your help appreciated.

    I do a plsql procedure that inserts a line according to the value of the slider, I have error oracle ORA-00001: unique constraint (constraint_name) violated.

    This message may appear if a duplicate entry exists at a different level: in the RDBMS MySQL, I have the syntax IGNORES to solve this error of duplication... and in Oracle?

    Thanks for your time and your advice.
    Miguelito

    user6317803 wrote:
    How to solve the error ORA-00001 in SQL Insert?

    ORA-00001 means table a unique/primary key / index and you attempt to insert a row with the key value already exists in the table. I'll assume table has a primary key on COUNTRY_ID. Then modify SQL for:

    SQL = "INSERT INTO COUNTRIES (COUNTRY_ID, COUNTRY_NAME, REGION_ID) SELECT"BZ","BLZ", 3 DOUBLE WHERE DOES NOT EXIST (SELECT 1 FROM COUNTRIES WHERE COUNTRY_ID ="BZ").

    There is a good chance COUNTRY table also has unique key/index on COUNTRY_NAME. If so use:

    SQL = "INSERT INTO COUNTRIES (COUNTRY_ID, COUNTRY_NAME, REGION_ID) SELECT"BZ","BLZ", 3 DOUBLE WHERE DOES NOT EXIST (SELECT 1 FROM COUNTRIES WHERE COUNTRY_ID = 'BZ' OR 'BLZ' = COUNTRY_NAME).

    SY.

  • Problem with PL/SQL insert query

    Hello to all the genius... Vikram im, Im new in the world of the apex and pl/sql... I need everything that you guys help... This is my first application user (for example)

    name of the table - form
    name of the column - f_no number, name varchar2, number of salary.
    Apex page n - p1_f_no, p1_name, p1_sal

    Now my problem is the query that is below works in the workshop of sql (insertion of data in the table in shape) and can be seen using the select query... but when I implement this in the apex... It shows - in all areas:

    declare
    v_no number (3);
    v_Name varchar2 (20);
    v_sal number (10);
    Start
    Insert in the form values (: v_no,: v_name,: v_sal);
    end;

    IM using this query in the Process button,

    Thank you

    -Best regards,.
    Vikram

    Mahir M. Quluzade have already responded.

    Published by: Gokhan Atil on 03.May.2011 12:45

  • How to close a sql insert?

    I have an ASP poll that takes questions from a sql database. The results table to store the answer is simple. It has a field ID result, QID, and response.

    Given that the survey is built dynamically, the number of questions in each survey is limitless. So my problem. How to build a sql Insert loop thru and add value to the db for QID?

    There is a tutorial on the www.charon.co.uk that may be of some use to you as
    It is written for ASP.

    --
    Paul Whitham
    Certified Professional Dreamweaver MX2004
    Adobe Community Expert - Dreamweaver

    Valleybiz Web design
    www.valleybiz.NET

    "Lucky Kitty" wrote in message
    News:f2f1tk$KVG$1@forums. Macromedia.com...
    > I have an ASP poll that takes questions from a sql database. Results
    > table to store the answer is simple. It has an ID of result, QID, and response
    > field.
    >
    > Since the investigation is built dynamically, the number of questions in each
    > investigation
    > is limitless. So my problem. How to build a sql insert
    > statement to
    > loop thru and add value to the db for QID?
    >

  • PL/SQL Insert Row Assign PK Value

    I try to insert a row of data into a table and assign a primary key value. I want to give the first available primary key, not only the nextval in the maxval. Is there a way to do it cleanly, or will I need to create a cursor to do? If I need to create a slider or the sequence, how do I declare it in my procedure? Do I need a sequence so that I couldn't just use a loop for? Please help - it seems such a simple thing, but it has left me speechless.

    CheRenee

    Look at this,

    SQL> Create table M_MOVIES(MOVIE_ID NUMBER not null);
    
    Table created
    SQL> Alter table M_MOVIES add constraint PROD_ID_PK primary key (MOVIE_ID);
    
    Table altered
    
    SQL> Insert Into M_movies
      2    (Select level id_movies From dual connect by level <= 10);
    
    10 rows inserted
    SQL> Commit;
    
    Commit complete
    
    SQL> CREATE SEQUENCE seq_avail_id
      2  START WITH 1
      3  INCREMENT BY 1
      4  MAXVALUE 99999999
      5  /
    
    Sequence created
    
    SQL> INSERT INTO m_movies(movie_id) VALUES(seq_avail_id.NEXTVAL);
    
    INSERT INTO m_movies(movie_id) VALUES(seq_avail_id.NEXTVAL)
    
    ORA-00001: unique constraint (SYSTEM.PROD_ID_PK) violated
    
    SQL> Drop SEQUENCE seq_avail_id;
    
    Sequence dropped
    
    SQL> Select max(movie_id) from m_movies;
    
    MAX(MOVIE_ID)
    -------------
               10
    
    SQL> CREATE SEQUENCE seq_avail_id
      2  START WITH 11
      3  INCREMENT BY 1
      4  MAXVALUE 99999999
      5  /
    
    Sequence created
    
    SQL> INSERT INTO m_movies(movie_id) VALUES(seq_avail_id.NEXTVAL);
    
    1 row inserted
    

    Kind regards
    Christian Balz

  • Reflecting an SQL insert into a list

    Hello

    My app has a list on the main sprite.  The data source of this sprite is a class that manages a SQLite DB.  There is a function in this class that returns a dataProvider.  In the main sprite initializeUI(), I have contactList.dataProvider = contactSQLData.getTableData ();

    There's another sprite which is loaded when the application starts and hidden off the screen.  When the user presses the button Add, that another sprite slide in with a tweener.  The user fills out the form and record visits.  I'm passing the list of contacts and contactSQLData to the second sprite through a few affected public objects main sprite after initialization.

    When recording button, I run an insert statement, and then tweener the sprite off the screen.  Now, back to the main sprite with the list. I want this insert will appear in the list.  BTW, the list uses a custom converter in the list of the skin cells.

    For inclusion appears, I have tried, in the backup function:

    //insert into DB
    contactSQLData.addData(time.text, opname.text, notes.text);
    //reload dataProvider and assign to list
    contactList.dataProvider = contactSQLData.getTableData();
    //redraw list on main sprite
    contactList.invalidate(InvalidationType.ALL, false);
    

    Invalidate the list is the only way I can get to display any type of update, but it seems that to invalidate certain cells.  When I create first the DP in the SQL class I add a header in the first place, and then loop through the results of sql and add them to the RFP.  The invalidate on the list put the header next to the last line and I just added last and all previous Scriptures are before a new element.

    In fact the traces, I see that the items are added to the RFP in the right order, since they came out of the DB.  But when the list is invalidated, it seems not all of them are redrawn.

    Any ideas?

    Thank you

    Nick

    Hey nwgarner,

    the photos have not been approved will not be able to see them until they are. However, I think you could run a problem in the method drawLabel() of the cell display. This is called only once when the list is first created. So what you want to do is update your labels when new data are inserted in the cell renderer. for this, you need to replace the Set data() thus set accessor function. This way your custom CellRenderer will be able to handle the new data when it comes. so to do this, implement the following modified cell rendering engine:

    ContactsCellRenderer.as:

    package ContactsCellRenderer{  import flash.display.Shape;   import flash.text.TextFormat; import flash.text.TextFormatAlign;
    
      import qnx.ui.core.Container; import qnx.ui.core.ContainerFlow; import qnx.ui.listClasses.CellRenderer;   import qnx.ui.text.Label;
    
      public class ContactsCellRenderer extends CellRenderer    {     private var cellBackground:Shape;
    
          private var idLabel:Label;        private var timeLabel:Label;      private var opnameLabel:Label;        private var notesLabel:Label;     private var modeLabel:Label;
    
          private var LABEL_HEIGHT:int = 30;
    
          public function ContactsCellRenderer()        {         super();
    
              cellBackground = new Shape();
    
              idLabel = new Label();            timeLabel = new Label();          opnameLabel = new Label();            notesLabel = new Label();         modeLabel = new Label();      }
    
          override protected function init():void       {         super.init();     }
    
          override protected function onAdded():void        {         super.onAdded();          removeChild(label);           this.cellBackground.graphics.beginFill(0xBBBBBB, 1);          this.cellBackground.graphics.drawRect(0, 0, 900, LABEL_HEIGHT);           this.cellBackground.graphics.endFill();           this.addChild(this.cellBackground);       }
    
          override protected function drawLabel():void      {         trace("drawLabel()");         if (this.data)            {             var headerFormat:TextFormat = new TextFormat();               headerFormat = new TextFormat();              headerFormat.color = 0xFFFFFF;                headerFormat.bold = true;
    
                  /*                * Sometimes this function is called prematurely when there                * is no data object available and it is null so we only               * do our custom label when there is a data object available               */
    
                  this.idLabel.width = 30;              this.idLabel.x = 0;
    
                  this.timeLabel.width = 250;               this.timeLabel.x = 20;;
    
                  this.opnameLabel.width = 100;             this.opnameLabel.x = this.timeLabel.width + 30;
    
                  this.notesLabel.width = 100;              this.notesLabel.x = this.timeLabel.width + this.opnameLabel.width+ 30;
    
                  this.modeLabel.width = 100;               this.modeLabel.x = this.timeLabel.width + this.opnameLabel.width + this.notesLabel.width + 30;
    
                  if (this.data.id == "0")              {                 this.timeLabel.format = headerFormat;                 this.opnameLabel.format = headerFormat;                   this.notesLabel.format = headerFormat;                    this.modeLabel.format = headerFormat;             }
    
                  trace("Adding id cell: " + this.data.id);             this.addChild(idLabel);               this.addChild(timeLabel);             this.addChild(opnameLabel);               this.addChild(notesLabel);                this.addChild(modeLabel);         }     }
    
          override protected function onRemoved():void      {         trace("onRemoved");           super.onRemoved();
    
              //undo the add child          removeChild(this.cellBackground);         removeChild(this.idLabel);            removeChild(this.timeLabel);          removeChild(this.opnameLabel)         removeChild(this.notesLabel);         removeChild(this.modeLabel);
    
          }
    
          override public function set data(data:Object):void       {         super.data = data;
    
              if (this.data)            {             this.idLabel.text = this.data.id;             this.timeLabel.text = this.data.time;             this.opnameLabel.text = this.data.opname;             this.notesLabel.text = this.data.notes;               this.modeLabel.text = this.data.mode;         }     }          }}
    

    So now, we update the labels with the new set of data whenever there is a change. everything I think we can leave it intact as is and should not be a problem. so re-apply your cellrenderer and see what happens.

    Thanks for the appreication, it is always welcome! im just happy that I can be useful, the playbook needs all it can get its third-party developers like you to succeed. My theory is more quality apps more it will do on its competitors! good luck and let me know how it turns out that!

  • pl/sql insert if not exists

    Hello

    Is my version of oracle 11g

    I am trying to write a pl/sql where is check if the line exists, and if not insert.

    If its exists it returns the primary key.

    I have a table searchaddress that has the column searchaddress_pk, street, city, postal code.

    I have attached the package. The procedure works fine when it compares with all the columns in the table.

    I inserted manually 3 rows

    Postal code city searchaddress_pk Street

    1 large eh245gh London street

    2 London

    3 Street London

    If I pass all 3 values then it returns the primary key 1 fine.

    But if I spend 1 or 2 values then its not not return primary keys and inserting each and every time.

    in the procedure if I only spend value city or city value London London and value high street, street to his insertion of each and every time.

    I expect to come back 2 when I spend in London

    and 3 when I go to London and high street.

    The procedure works only if I pass all 3 values.

    as I am new to pl/sql, looking for help if someone fell on the same scenario.

    Thank you

    I did not open your attachment zip - you can just paste the code in your message.

    However, I can guess your question. NULL is not equal to NULL

    You need something like:

    where (city = p_town or (city is null and p_town is null))

    and (street = p_street or (street is null and p_street is null))

    (postal code = p_postcode or (postal code is null and p_postcode is null))

  • PL/SQL insert based on conditions

    I'd appreciate any help I can get. I learn PL/SQL and have stumbled upon a problem, so please help me to find an appropriate way to deal with this situation I am running Oracle 11 GR 2

    My diagram:

    CREATE TABLE "ENTRY"
    (
    'TYPE' VARCHAR2 (5 CHAR) ,
    'TRANSACTION' VARCHAR2()5 TANK),
    'OWNER' VARCHAR2 (5 CHAR)
    ); 

    CREATE TABLE "VIEW"
    (
    'TYPE' VARCHAR2 (5 CHAR) ,
    'TRANSACTION' VARCHAR2 (5 CHAR),
    'OWNER' VARCHAR2 (5 CHAR)
    ); 

    CREATE TABLE "REJECTED"
    (
    'TYPE' VARCHAR2 (5 CHAR) ,
    'TRANSACTION' VARCHAR2 (5 CHAR),
    'OWNER' VARCHAR2 (5 CHAR)
    );

    My sample data:

    insert into entry (type, transaction, owner) values (11111, 11111, 11111);
    insert into entry (type, transaction, owner) values (22222, 22222, 22222);

    Now for the confusing part, I wrote this procedure which has to copy the values from the table ENTRY in the table VIEW if a record is no specific combination (transaction AND owner). If such an association exists in the table for VIEW this record should then go to the REJECTED table. This procedure done that but on the executions of the procedure, I get more entries in the REJECTED table so my question is how do to limit inserts them into the table of REJECTED - if a record already exists in the REJECTED table then do nothing.

    create or replace PROCEDURE COPY AS 
    v_owner_entry ENTRY
    .owner%TYPE;
    v_transaction_entry ENTRY
    .transaction%TYPE; 
    v_owner
    VIEW.owner%TYPE;
    v_transaction
    VIEW.transaction%TYPE; 

    begin 

    begin 
    select e.owner, e.transaction, v.owner, v.transaction
    into v_owner_entry, v_transaction_entry, v_owner, v_transaction
    from entry e, view v
    where e.owner = v.owner and e.transaction = v.transaction; 


    EXCEPTION
    when too_many_rows
    then insert into REJECTED ( TYPE, TRANSACTION, OWNER ) SELECT s1.TYPE, s1.TRANSACTION, s1.OWNER FROM ENTRY s1; 

    when no_data_found THEN  insert into VIEW ( TYPE, TRANSACTION, OWNER ) SELECT s.TYPE, s.TRANSACTION, s.OWNER FROM ENTRY s; 
    end;
    end;

    Any suggestions guys?

    See you soon!

    UPDATE

    Sorry if the original message was not enough - clear the procedure must replicate data (on a daily basis) of DB1 to DB2 and insert in the VIEW or REJECTED depending on the conditions. Here is a picture, it would be perhaps more clearly:

    replicate.jpg

    Hello

    your procedure could look something like this:

    declare
      -- Local variables here
      i integer;
    begin
      -- Test statements here
      INSERT INTO REJECTED
      (TYPE, TRANSACTION, OWNER)
      SELECT ENTRY.TYPE, ENTRY.TRANSACTION, ENTRY.OWNER
        FROM ENTRY, VIEW
       WHERE ENTRY.OWNER = VIEW.OWNER
         AND ENTRY.TRANSACTION = VIEW.TRANSACTION
         AND NOT EXISTS
       (SELECT NULL
                FROM REJECTED VW2
               WHERE VW2.OWNER = ENTRY.OWNER
                 AND VW2.TRANSACTION = ENTRY.TRANSACTION);
    
    INSERT INTO VIEW
      (TYPE, TRANSACTION, OWNER)
      SELECT TYPE, TRANSACTION, OWNER
        FROM ENTRY
       WHERE NOT EXISTS (SELECT NULL
                FROM VIEW
               WHERE ENTRY.OWNER = VIEW.OWNER
                 AND ENTRY.TRANSACTION = VIEW.TRANSACTION);
    COMMIT;
    end;
    

    Edited: Use SQL syntax

  • issue: sql insert into select

    which is wrong with this query?

    insert into m_payment_option (p_type, m_fulfillment)

    values ('DIRECT_DEBIT', (select id from M_FULFILLMENT whose id not in (select m_fulfillment from M_PAYMENT_OPTION)));

    SQL-Fehler: ORA-01427: Unterabfrage fur eine liefert mehr als eine line line

    01427 00000 - "einreihig subquery returns several lines.

    the subquery returns:

    SELECT id from M_FULFILLMENT whose id not in (select m_fulfillment from M_PAYMENT_OPTION)

    47113

    47182

    47183

    ..

    Hallo,

    Try this

    insert into m_payment_option (p_type,m_fulfillment)
    select 'DIRECT_DEBIT', id from M_FULFILLMENT  where id not in (select m_fulfillment from M_PAYMENT_OPTION));
    

    The subquery in your statement offers several lines and failed to insert 2 or more values in your m_fulfillment column at a time.

    But I think you want to insert several lines. Otherwise, you need to change your subquery to offer that one value, maybe a max or min function will help.

    Grüße aus Bonn

    Kay

  • How a pl/sql procedure immediately after the action of page submit/SQL insert?

    I have an entry form where the user enters data and click on the button create which then inserts a record into a table.

    I want to do a few p/sql additional treatment immediately after the record is inserted, using the value of the primary key.

    I tried to create a process page after submit as well as a DA pull on the change of the primary key element, but nothing does.

    Where should I put my code so that my plsql is triggered immediately after the presentation of the page, and after a successful insertion of the folder?

    Any ideas are appreciated!

    Thank you

    John

    Thanks Andre - I had a bug in my pl/sql. A simple process page after submitting is working as expected.

  • service that uses multiple sql insert commands

    Hello!  Is it possible to use a service that updates tables of two DB?  In addition, these two tables, a field is the same as the ProcessID? For example, here is the service:

    < b >

    < td > < table > EUM_WORKFLOW_UPDATE_ACTIONS

    < td > Service

    3

    null

    null

    value Null < br >

    value Null < table >

    2:IEumWorkflowActions:null < td >

    -> 2:IEumWorkflowDocumentProcess:Null < table >

    < /tr >

    Here are two separate petitions of SQL in the function above:

    < b >

    IEumWorkflowActions < td > < table >

    < td > INSERT IN EUM_WORKFLOW_ACTIONS (WORKFLOWACTION, WKFLACTIONID) values (?,?) < table >

    < td > WORKFLOWACTION varchar

    WKFLACTIONID int < table >

    < /tr >

    < b >

    IEumWorkflowDocumentProcess < td > < table >

    the values of < td > INSERT IN EUM_WORKFLOW_ACTIONS (DocumentProcessID, dDocName, WKFLACTIONID, dRevLabel) (?,?,?,?) < table >

    WKFLACTIONIDint < td >

    DocumentProcessID int

    dDocName varchar

    dRevLabel varchar < table >

    < /tr >

    And here's how to call this service by calling GenericSoapPort:

    " < envelope soap: xmlns:soap = ' http://schemas.xmlsoap.org/SOAP/envelope/ ">

    " < soap: Body = xmlns:ns1 ' http://www.Oracle.com/UCM "> "

    < ns1:GenericRequest webKey = "cs" >

    < ns1:Service IdcService = "EUM_WORKFLOW_UPDATE_ACTIONS" >

    < ns1: User > < / ns1: User >

    < ns1:Document >

    reject < name ns1:Field = "WORKFLOWACTION" > < / ns1:Field >

    < ns1:Field = "WKFLACTIONID" > 123 name < / ns1:Field >

    < ns1:Field = "WKFLACTIONID" > 123 name < / ns1:Field >

    < ns1:Field = "DocumentProcessID" > 45234 name < / ns1:Field >

    < name ns1:Field = "dDocName" > 1554322 < / ns1:Field >

    < ns1:Field = "dRevLabel" > 1 a name < / ns1:Field >

    < / ns1:Document >

    < / ns1:Service >

    < / ns1:GenericRequest >

    < / soap: Body >

    < / envelope soap: >

    Would it not possible do NOT use the WKFLACTIONID twice in the service somehow call?

    Thank you very much for your help!

    Yes, it is possible. You can run as many SQL statements in a service you want.

    With respect to the parameters, see the DataAccess from samples of how many components component. Basically, what you're doing are map placeholders to the parameters of the services (such as David to the DataAccess component). Note that these settings can be taken from an application, but also calculated (for example a SELECT statement calculates a parameter for INSERTION, but you can also use Java/idocscript), so most likely you must map the parameters of SOAP on them.

  • Query Insert slows in Timesten

    Hello DB Experts.

    I am inserting data block with the ttbulkcp command. My permsize is 20 GB. Insert the query becomes slow. can anyone help me that how can I maximize the flow by ttbulkcp.

    Kind regards

    Hi chris,

    We have created the java batch program sample and we have tested bulk insertion, we reached aroud 60000 GST. I want to thank you for your support.

  • Tuning sql insert that inserts 1 million lines makes a full table scan

    Hi Experts,

    I'm on Oracle 11.2.0.3 on Linux. I have a sql that inserts data into a table of History/Archives of a table main application based on the date. The application table has 3 million lines. and all the lines that are more then 6 months old must go in a table of History/Archives. This was decided recently, and we have 1 million rows that meet this criterion. This insertion in table archive takes about 3 minutes. Plan of the explain command shows a full table scan on the main Board - which is the right thing, because we are pulling 1 million rows in the main table in the history table.

    My question is that, is it possible that I can do this sql go faster?

    Here's the query plan (I changed the names of table etc.)

       INSERT INTO EMP_ARCH
       SELECT *
    FROM EMP M
    where HIRE_date < (sysdate - :v_num_days);
    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        2      0.00       0.00          0          0          0           0
    Execute      2     96.22     165.59      92266     147180    8529323     1441230
    Fetch        0      0.00       0.00          0          0          0           0
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total        4     96.22     165.59      92266     147180    8529323     1441230
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: FIRST_ROWS
    Parsing user id: 166
    Rows     Row Source Operation
    -------  ---------------------------------------------------
    1441401   TABLE ACCESS FULL EMP (cr=52900 pr=52885 pw=0 time=21189581 us)
    
    
    

    I heard that there is a way to use opt_param tip to increase the multiblock read County but did not work for me... I will be grateful for suggestions on this. can collections and this changing in pl/sql also make it faster?

    Thank you

    OrauserN

    (1) create an index on hire_date

    (2) tip 'additional' use in the 'select' query '

    (3) run ' alter session parallel DML'; before you run the entire statement

Maybe you are looking for