Quick insertion into DB jdev 10.1.3.4

Hi, I have a loop in which I store data (150 entries after every cycle)
 private Map<Object, String> field = new HashMap<Object, String>();// where Object - element from form

    public String commandButton_action() {
        Object result;
        createField();
        //        getApplicationModule();
        String reqId = (String)getReqId().getValue();

        ApplicationModule am = FacesUtil.getAM("QstAMDataControl");
        LoanAppQstViewImpl vo = 
            (LoanAppQstViewImpl)am.findViewObject("LoanAppQstView1");
       
        for (Object key: field.keySet()) {
            LoanAppQstViewRowImpl row = (LoanAppQstViewRowImpl)vo.createRow();
            System.out.println("Object " + field.get(key));
            row.setAttribute("QstPartId", field.get(key));
            row.setAttribute("ReqId", reqId);
            row.setAttribute("LarSn", "1");
            String value = getValueFromObject(key);
            row.setAttribute("LaqValue", value);
            System.out.println("LaqValue " + value);
            row.getLoanAppQst().getDBTransaction().commit();
        }

        vo.closeRowSet();
return null;
}
Please tell me how to speed up the backup?

There are several things to do.
(1) don't commit each line in itself because it takes time. Instead create the line and insert the line in the VO. Once all lines are inserted in the t commit the transaction
(2) use the batch update. For the VO, open the tunig section and select update in batches (for example, to set the size to 50). This means that the db is notified only after 50 insertions and all data from the 50 lines is transferd in a single segment. for your 150 lines, this means that 3 back and forth to the db are made once you validate the data instead of 150 without this parameter. You may need to use a VO that is used only for this operation because you can not use this aVO on a normal page.

Timo

Tags: Java

Similar Questions

  • a loop data and insert into another table fail

    HI EVEYONE,
    I'm new in PL/SQL and apply to develop, which I intend to extract data from PDF directly to the oracle database by looking at its difficulty that I changed the approach of the first extraction of my data to flat file and then convert Excel CSV format that makes it easier for me to handle in my oracle database.
    The challenge I'm having here is that
    The column id_number is a mixture of 3 identifications
    One for the facility, which has the form (YEAR/0145)
    The second is for participant with the form (* 01934764 *)
    And the last identification is for dependants with the form (0, 1, 2, 3, 4, 5)
    As shown below
    ID_Number status name
    YEAR/0145
    * 01934764 * MUOKA
    MUOKA main 0
    1 joint MUOKA
    Child2 3 MUOKA
    * 01934769 * TSILIA
    JOEL main 0
    1 joint TSILIA
    2 Child1 TSILIA
    3 Child2 TSILIA
    4 Child3 TSILIA
    5 child4 TSILIA
    * 02216419 * OKOLO
    OKOLO main 0
    1 joint OKOLO
    2 Child1 OKOLO
    3 Child2 OKOLO
    4 Child3 OKOLO
    YEAR/0145
    EZEOKOLI main 0
    1 joint EZEOKOLI
    YEAR/0171
    * 01580118 * ABDOU
    Main 0 ABDOU
    1 joint ABDOU
    2 Child1 ABDOU
    3 Child2 ABDOU
    4 Child3 ABDOU
    5 child4 ABDOU
    BA/0003
    * 00992897 * BAKARI
    BAKARI main 0
    1 joint BAKARI
    BA/0004
    * 00992011 * MAINA
    MAINA main 0
    1 joint MAINA
    2 Child1 MAINA
    3 Child2 MAINA
    4 MARCO Child3
    5 child4 MAINA
    My goal is to separate facilities, participants and beneficiaries so that questioning, I can easily identify a participant and its beneficiaries is under a given installation, so I developed this code.
    create or replace procedure my_new
    is
    cursor c1 is
    Select *.
    the registry
    where id_number like "% / %" or id_number like ' * % *' or id_number in ('0', '1', '2', '3', '4',' 5');

    vNhis register.id_number%TYPE: = NULL;
    vNhis1 register.id_number%TYPE: = NULL;

    Start
    I'm in c1
    loop

    If i.id_number like "% / %".
    then
    vNhis: = i.id_number;

    on the other
    vNhis1: = i.id_number;
    dbms_output.put_line(vNhis||) e '|| vNhis1);


    -loop
    -insert into new_REGISTER (FACILITY_CODE, ID_NUMBER)
    -values (vNhis, vNhis1);
    -commit;
    -end loop;
    end if;

    end loop;
    end;
    It gives me a good quick result as shown below
    YEAR/0145 * 01934764 *.
    YEAR/0145 0
    1 YEAR/0145
    3 YEAR/0145
    YEAR/0145 * 01934769 *.
    YEAR/0145 0
    1 YEAR/0145
    2 YEAR/0145
    3 YEAR/0145
    4 YEAR/0145
    5 YEAR/0145
    YEAR/0145 * 02216419 *.
    YEAR/0145 0
    1 YEAR/0145
    2 YEAR/0145
    3 YEAR/0145
    4 YEAR/0145
    YEAR/0145 0
    1 YEAR/0145
    YEAR/0171 * 01580118 *.
    YEAR/0171 0
    1 YEAR/0171
    2 YEAR/0171
    3 YEAR/0171
    4 YEAR/0171
    5 YEAR/0171
    BA/0003 * 00992897 *.
    BA/0003 0
    BA/0003 1
    BA/0004 * 00992011 *.
    BA/0004 0
    BA/0004 1
    BA/0004 2
    BA/0004 3
    BA/0004 4
    BA/0004 5





    But uncommenting to insert into the newly created table new_register table it is to say this part of the code
    Loop
    Insert in the REGISTER (FACILITY_CODE, NHIS_NUMBER)
    values (vNhis, vNhis1);
    commit;
    end loop;
    end if;

    It took all day to run for the first time and subsequent tests fail to run with my hanging of database. any help on this is appreciated
    Thanks to you all.

    It is slow because you do a lot of change between the SQL and PL/SQL engine with inserts all looped and individual context etc.

    What you need to do is to treat the external table (CSV file) data in a single SQL statement example

    SQL> select id1, id2
      2  from (
      3        select case when id1 is not null then id1 else last_value(id1 ignore nulls) over (order by rn) end as id1
      4              ,id2
      5              ,rn
      6        from (
      7              select rownum as rn
      8                    ,case when id_number like '%/%' then id_number else null end as id1
      9                    ,case when id_number not like '%/%' then id_number else null end id2
     10              from ext_test
     11             )
     12       )
     13  where id2 is not null
     14  order by rn;
    
    ID1                  ID2
    -------------------- --------------------
    AN/0145              *01934764*
    AN/0145              0
    AN/0145              1
    AN/0145              3
    AN/0145              *01934769*
    AN/0145              0
    AN/0145              1
    AN/0145              2
    AN/0145              3
    AN/0145              4
    AN/0145              5
    AN/0145              *02216419*
    AN/0145              0
    AN/0145              1
    AN/0145              2
    AN/0145              3
    AN/0145              4
    AN/0145              0
    AN/0145              1
    AN/0171              *01580118*
    AN/0171              0
    AN/0171              1
    AN/0171              2
    AN/0171              3
    AN/0171              4
    AN/0171              5
    BA/0003              *00992897*
    BA/0003              0
    BA/0003              1
    BA/0004              *00992011*
    BA/0004              0
    BA/0004              1
    BA/0004              2
    BA/0004              3
    BA/0004              4
    BA/0004              5
    
    36 rows selected.
    
  • INSERT INTO table (columns...) with table_tmp in select... ...

    Hi guru,.

    Is less than a valid SQL | Statement of PLSQL? or several instructions and what it does?

    insert into table (col1, col2, col3, col4)
    with table_tmp as
    (select ccol1, ccol2, ccol3, ccol4, ccol5, ccol6
    from table1, table2 t2 t1
    where t1.id = t2.id
    and t2.start > sysdate()
    )
    Select tcol1, tcol2, tcol3, tcol4
    of table_tmp tt1, table3 t3
    where tt1.id = tt3.id;

    I checked the SQL quick reference card and don't see anything similar to this... I wonder where I can find a better book of reference for the syntax.

    Thanks in advance
    KH

    user5885318 wrote:
    Is less than a valid SQL | Statement of PLSQL? or several instructions and what it does?

    It inserts data into the table

    insert into table (col1, col2, col3, col4)

    (ok, ignoring the fact that you can't have a table named table)

    using the select statement located below

    with table_tmp as
    (select ccol1, ccol2, ccol3, ccol4, ccol5, ccol6
    from table1, table2 t2 t1
    where t1.id = t2.id
    and t2.start > sysdate()
    )
    Select tcol1, tcol2, tcol3, tcol4
    of table_tmp tt1, table3 t3
    where tt1.id = tt3.id;

    I checked the SQL quick reference card and don't see anything similar to this... I wonder where I can find a better book of reference for the syntax.

    SQL reference documentation contains the complete syntax for Oracle SQL, so how can you find a better reference for the syntax. I think your concept to better is all simply because you are not familiar with things and don't know where to find things. SQL is a huge beast, so you cannot expect to find things very quickly in all cases, especially if you don't really know what you are looking for.

    I'm guessing you are struggling to find information about the clause "WITH"?

    It is called subquery factoring and lie under the SELECT statement in the SQL reference:

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/statements_10002.htm#i2161315

    An equivalent statement without the WITH clause (using your insert as a base statement)...

    insert into table(col1, col2, col3, col4)
    select tcol1, tcol2, tcol3, tcol4
    from (select ccol1, ccol2, ccol3, ccol4, ccol5, ccol6
          from table1 t1, table2 t2
          where t1.id=t2.id
          and t2.start > sysdate()
         ) tt1
         , table3 t3
    where tt1.id=tt3.id;
    

    The done WITH clause takes the subquery in the main query. This is useful if the same subquery is needed more than once in the main query.

  • An animated (gif) file can be inserted into an email, or must it be attached?

    An animated gif file can be inserted into an e-mail? It's something that worked when I was using Outlook 2003, but does not work in Outlook 2010. Thunderbird allows a fully animated gif file in an email, or only as an attachment >

    It is animated by the recipient; Save as draft or see envoys.

  • list of quick insertion

    Hello

    my 'quick insert list' does not appear on the screen (ctrl + space). That is, you can choose it by alt + tab normally I use two screens, but the problem remains using a. It is started after ctrl + space, but you don't see it.

    Someone an idea?

    Large,

    Thomas

    Hi Thomas,

    Please have look at the following KB: http://digital.ni.com/public.nsf/allkb/9FDD4CEAEF7310F78625755B0051B743?OpenDocument

    Christian

  • Insert into table fault

    When I use the function 'insert into array' index(like 5), it does not work. When I put the index zero, it works, and inserts the new item at the end of the table. ?. ?

    Hello

    I think the problem is that you have not initialized your table to which you will add an element. You must double clik and adds a number. You can inicialize, only the last element and the other elements will also be inicialized.

    Try looking at the photo.

    Hope it helps

  • Impossible to insert a 1 d table in a 2D array using "insert into array.

    Hi all

    I have a very simple problem.

    I try to insert a table 1 d as a column in a table 2D using 'insert into array"as stated in image1.

    When I try to connect the table 1 d in the "new element/sub-table" terminal I get the error indicated in image2.

    According to the help files, I should be able to wire a table of size n-1 this as the 'new item/sub-table"terminal. In other words

    I should be able to connect a table 1 d here.

    Can someone tell me what I am doing wrong?

    Thanks for your help,

    Apparently I had converted the table to float in a 'worksheet chain' and I needed to convert it into an array before sending it to 'insert into array.

    Discover image3 for more details.

  • Why is my cd not load & play automatically when it is inserted into the media player?

    Why is my cd not load & play automatically when it is inserted into the media player?

    If you use Windows Vista or Windows 7, try the following:

    Click Start, type: AutoPlay

    Press enter on your keyboard

    Scroll to CDs

    Click in the list box

    Select an action:

    Play audio CD using Windows Media Player.

    See:

    Windows Media Player Fact not play Audio CD- Roma automatically

    Also:

    Media Player 12 auto-play when inserting audio CD ... behavior

  • "Please insert disk into drive F:" when you try to view files on a 4 gb SD card inserted into the laptop

    I bought a new SanDisk 4 gb SD card and inserted into my laptop after taking pictures of my camera. When I try to view the files, I get the above error message. It seems that many people have this problem, and other responses, it's a hardware problem - which I don't believe it's in my case, because it works fine in my camera and the Nintendo DSi XL. Any suggestions are appreciated. CHeers, Jherio

    I bought a new SanDisk 4 gb SD card and inserted into my laptop after taking pictures of my camera. When I try to view the files, I get the above error message. It seems that many people have this problem, and other responses, it's a hardware problem - which I don't believe it's in my case, because it works fine in my camera and the Nintendo DSi XL. Any suggestions are appreciated. CHeers, Jherio

    ========================================
    If it's your Media Player SDHC card is perhaps not compatible.

    Try to connect to the camera via a USB cable and see if you can download the files.

    Volunteer - MS - MVP - Digital Media Experience J - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - * proceed at your own risk *.

  • An analysis of the USP flash drive is essential to insert into the computer.

    I need to scan my Flash USB drive when inserted into my computer. I have Windows XP Home Edition and Microsoft Essentials as my virus prevention program.

    Insert your USB key, Point to computer on your Start Menu, right click USB choose scan with MSE. If the computer is not on your Start Menu click Start, all programs, accessories, System Tools, click computer, and you will see your USB key, right click, Scan.

  • How do I update my laptop so he sees my micro sd card, I inserted into my laptop, but it did not come

    How I update my laptop so he sees my micro sd card, I inserted into my laptop, but it didn't come up.

    help much appreciated.

    Hello

    Thank you for visiting Microsoft Community.

    According to the description, I understand that the problem with you want to update the laptop so that it can recognize the micro SD card in the computer.

    Of course, I understand the inconvenience and will try my best to help you.

    In order to understand the issue more clearly, please provide me the following information.

    1. What exactly happens when you insert the micro SD card in the laptop?
    2. Do you receive an error message? If Yes, what is the exact error message and the error code?
    3. What is the brand and model of the laptop?
    4. How you try to connect the SD card? Is inserting into the card reader on your computer or you are using an external card reader?
    5. You see an error message or the exclamation point in Device Manager when you connect the SD card?

    I suggest you follow the steps how to check for the exclamation point in Device Manager.

    1. Click on Start and go to Run.
    2. In the prompt to run it, type devmgmt.msc , and then click OK.
    3. Device Manager opens.
    4. In Device Manager, double-click the device category.
    5. Check the yellow exclamation point against each category.

    It is possible that this problem would have occurred if the chipset drivers are not updated in the system.

    I would suggest trying the following methods and check if it helps.

    Method 1:

    I suggest you to update the Chipset drivers on the manufacturer's Web site and check if it helps.

    If the problem persists, please follow method 2.

    Method 2:

    Try to run the built-in troubleshooting utility and check if it works.

    Open the hardware and devices Troubleshooter, please follow the steps in the link provided below.

    http://Windows.Microsoft.com/en-us/Windows7/open-the-hardware-and-devices-Troubleshooter

    Note: If your computer is having problems with a recently installed device or other hardware, try to use the hardware and peripheral troubleshooting tool to solve the problem. It checks the common issues of interest and ensures that a new device or hardware connected to your computer has been installed correctly.

    I hope this information is useful.

    Please let us know if you need more help, we will be happy to help you.

    Thank you.

  • 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!

  • Attempt to create run time (dynamic) table and insert the data in this... The entrance is a flat file (txt file) which has the numbers and strings... I'm trying to convert them to a string and insert into the table. It is a matter of urgency for me please

    create or replace procedure Dynamic_Table AS

    iVal VARCHAR2 (32);

    iTemp varchar (200): = ";

    sql_stmt VARCHAR2 (200);

    l_file1 UTL_FILE. TYPE_DE_FICHIER;

    l_file utl_file.file_type;

    BEGIN

    l_file1: = UTL_FILE. FOPEN ('TEST', 'dinput.txt', 'R');

    EXECUTE IMMEDIATE ' CREATE TABLE baseline (Item_ID varchar2 (32))';

    Loop

    BEGIN

    UTL_FILE. GET_LINE (l_file1, iVal);

    EXECUTE IMMEDIATE ' insert into baseline values (: ival) "using ival;

    EXCEPTION

    WHEN No_Data_Found THEN EXIT;

    While some OTHER THEN dbms_output.put_line (SQLERRM); * /

    END;

    end loop;

    END;

    You are approaching this the wrong way.  Create an external table based on the file.  External tables are CSV, fixed width data in a queryable table.

    You will need to create an oracle directory to put the file in (MY_ORA_DIR) I leave it for you to do, and then perform the following...

    create table BASELINE)

    ITEM_ID varchar2 (32)

    )

    EXTERNAL ORGANIZATION

    (

    TYPE ORACLE_LOADER

    THE DEFAULT DIRECTORY MY_ORA_DIR

    ACCESS SETTINGS

    (

    RECORDS DELIMITED BY NEWLINE

    LOGFILE "dinput.log".

    BADFILE "dinput.bad."

    NODISCARDFILE

    FIELDS

    (

    ITEM_ID

    )

    )

    LOCATION ("dinput.txt")

    )

    REJECT LIMIT UNLIMITED

    /

    All the dubious records appear in dinput.bad. Dinput.log will give you information.

    External tables are read-only, so once you set up your file, you can create editable as a normal table.

    create table ITABLE_EDITABLE as

    Select * from BASELINE

    /

    Work done, a few lines of code.

  • "missing the SELECT keyword" error during an insert into the temporary table using the blob value

    I'm trying to insert into an oracle temp table using select that retrieves data from a blob field but I get the error: "lack the SELECT keyword.

    How we store temporary in oracle result when we make this type of operation (extraction of data in fields and try to load them into a separate table on the fly.?)

    with cte as)

    Select user_id, utl_raw.cast_to_varchar2 (dbms_lob.substr (PREFERENCES)) as USER my_blob

    )

    create table new_table as

    SELECT user_id,EXTRACTvalue(xmltype(e.my_blob),'/preferences/locale') regional settings

    E ETC

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

    BLOB data - value - which is

    <? XML version = "1.0" encoding = "ISO-8859-1" ?>

    - < Preferences >

    < time zone > America/New_York < / > zone

    < displayscheduleinusertimezone > Y < / displayscheduleinusertimezone >

    < local > Spanish < /locale >

    < DateFormat > JJ/mm/aaaa < / DateFormat >

    < timeFormat > hh: mm aaa < / timeFormat >

    < longformat > Long_01 < / longformat >

    < doubleformat > Double_01 < / doubleformat >

    < percentformat > Percentage_01 < / percentformat >

    < currencyformat > Currency_01 < / currencyformat >

    < / Preferences >

    A WITH clause that must immediately precede the SELECT keyword:

    SQL > create table t:

    2 with the o as (select double dummy)

    3 select * West longitude;

    Table created.

  • Insert into... How to do it with a big enough request?

    Hello

    I want to store the result of this query in a table:

    insert into dbsnmp.zetup_iostat (seq_ms, seq_ct, lfpw_ms, lfpw_ct, scat_ms, scat_ct, dpr_ms, dpr_ct, dprt_ms, dprt_ct, prevseq_ct, prevscat_ct, prevseq_tm, prevscat_tm, prevsec, prevlfpw_tm, prevlfpw_ct, prevdpr_ct, prevdpr_tm, prevdprt_ct, prevdprt_tm, prevdpw_ct, prevdpw_tm

    prevdpwt_ct, prevdpwt_tm) values (seq_ms, seq_ct, lfpw_ms, lfpw_ct, scat_ms, scat_ct, dpr_ms, dpr_ct, dprt_ms, dprt_ct, prevseq_ct, prevscat_ct, prevseq_tm, prevscat_tm, prevsec, prevlfpw_tm, prevlfpw_ct, prevdpr_ct, prevdpr_tm, prevdprt_ct, prevdprt_tm, prevdpw_ct, prevdpw_tm

    prevdpwt_ct, prevdpwt_tm)

    Select

    Round (seqtm/NULLIF(seqct,0), 2) seq_ms.

    Round (seqct/NULLIF(Delta,0), 2) seq_ct.

    Round (lfpwtm/NULLIF(lfpwct,0), 2) lfpw_ms.

    Round (lfpwct/NULLIF(Delta,0), 2) lfpw_ct.

    Round (scattm/NULLIF(scatct,0), 2) scat_ms.

    Round (scatct/NULLIF(Delta,0), 0) scat_ct,

    Round (dprtm/NULLIF(dprct,0), 2) dpr_ms.

    Round (dprct/NULLIF(Delta,0), 2) dpr_ct.

    Round (dprttm/NULLIF(dprtct,0), 2) dprt_ms.

    Round (dprtct/NULLIF(Delta,0), 2) dprt_ct.

    prevseq_ct, prevscat_ct, prevseq_tm, prevscat_tm, prevsec, prevlfpw_tm, prevlfpw_ct

    prevdpr_ct, prevdpr_tm, prevdprt_ct, prevdprt_tm, prevdpw_ct, prevdpw_tm

    prevdpwt_ct, prevdpwt_tm

    Of

    (select

    sum (decode (event, 'db file sequential read', round(time_waited_micro/1000) - & prevseq_tm_var, 0)) seqtm,.

    sum (decode (event, "db-reading of scattered files", round(time_waited_micro/1000) - & prevscat_tm_var, 0)) scattm,.

    sum (decode (event, 'parallel writing to log file', round(time_waited_micro/1000) - & prevlfpw_tm_var, 0)) lfpwtm,.

    sum (decode (event, 'db file sequential read', round(time_waited_micro/1000), 0)) prevseq_tm,.

    sum (decode ("db-reading of scattered files", event, round(time_waited_micro/1000), 0)) prevscat_tm,.

    sum (decode (event, 'parallel writing to log file', round(time_waited_micro/1000), 0)) prevlfpw_tm,.

    sum (decode (event, 'db file sequential read', total_waits - & prevseq_ct_var, 0)) seqct,.

    sum (decode (event, "db-reading of scattered files", total_waits - & prevscat_ct_var, 0)) scatct,.

    sum (decode (event, 'parallel writing to log file', total_waits - & prevlfpw_ct_var, 0)) lfpwct,.

    sum (decode (event, 'db file sequential read', total_waits, 0)) prevseq_ct,.

    sum (decode ("db-reading of scattered files", event, total_waits, 0)) prevscat_ct,.

    sum (decode (event, 'parallel writing to log file', total_waits, 0)) prevlfpw_ct,.

    sum (decode (event, 'direct path read', round(time_waited_micro/1000) - & prevdpr_tm_var, 0)) dprtm,.

    sum (decode ('direct path read', event, round(time_waited_micro/1000), 0)) prevdpr_tm,.

    sum (decode (event, 'direct path read', total_waits - & prevdpr_ct_var, 0)) dprct,.

    sum (decode ('direct path read', event, total_waits, 0)) prevdpr_ct,.

    sum (decode (event, 'Write direct path', round(time_waited_micro/1000) - & prevdpw_tm_var, 0)) dpwtm,.

    sum (decode (event, 'Write direct path', round(time_waited_micro/1000), 0)) prevdpw_tm,.

    sum (decode (event, 'Write direct path', total_waits - & prevdpw_ct_var, 0)) dpwct,.

    sum (decode (event, 'Write direct path', total_waits, 0)) prevdpw_ct,.

    sum (decode (event, ' path direct writing temp', round(time_waited_micro/1000) - & prevdpwt_tm_var, 0)) dpwttm,.

    sum (decode (' path direct writing temp', event, round(time_waited_micro/1000), 0)) prevdpwt_tm,.

    sum (decode (event, ' path direct writing temp', total_waits - & prevdpwt_ct_var, 0)) dpwtct,.

    sum (decode (' path direct writing temp', event, total_waits, 0)) prevdpwt_ct,.

    sum (decode (event, 'the direct path read temp', round(time_waited_micro/1000) - & prevdprt_tm_var, 0)) dprttm,.

    sum (decode (event, "the direct path read temp", round(time_waited_micro/1000), 0)) prevdprt_tm,.

    sum (decode (event, 'the direct path read temp', total_waits - & prevdprt_ct_var, 0)) dprtct,.

    sum (decode (event, "the direct path read temp", total_waits, 0)) prevdprt_ct,.

    Delta to_char (sysdate, 'SSSSS') - & prevsec_var,

    to_char(sysdate,'SSSSS') prevsec

    Of

    v$ system_event

    where

    test of ('db file sequential read',

    "scattered files db reading."

    "direct way read temp."

    "direct path write temp."

    "direct path read."

    "Write direct way."

    "log file parallel write")

    ) ;

    create table iostat_table)

    number of seq_ms

    number of seq_ct

    number of lfpw_ms

    number of lfpw_ct

    number of scat_ms

    number of scat_ct

    number of dpr_ms

    number of dpr_ct

    number of dprt_ms

    number of dprt_ct

    number of prevseq_ct

    number of prevscat_ct

    number of prevseq_tm

    number of prevscat_tm

    number of prevsec

    number of prevlfpw_tm

    number of prevlfpw_ct

    number of prevdpr_ct

    number of prevdpr_tm

    number of prevdprt_ct

    number of prevdprt_tm

    number of prevdpw_ct

    number of prevdpw_tm

    number of prevdpwt_ct

    number of prevdpwt_tm

    );

    I get

    ERROR on line 4:

    ORA-00933: SQL not correctly completed command.

    When you run the query.

    How well do things?

    Concerning

    3

    Delete 'values' of the insert bit.

    insert into iostat_table...

    Select

Maybe you are looking for