Insertion of the Oracle is slow

Hello


On my production server with the problem of the insert. Regular load of Leon SQL file, it takes longer to insert data into the database.
First 2 and 3 a single file hours take 8-10 seconds after he took 5 minutes.


According to my understanding, OS e/s is very slow, the first 3 hours DB buffer is free and insert data in a normal buffer.
But when the buffer is filling then goes buffer waits and then insert is slow on. If this rite it please tell me how to increase I/O.




Somewhere here from my server analysis...

[root@myserver ~] # iostat
Linux 2.6.18 - 194.el5 (myserver) 01/06/2012

AVG - cpu: nice % user % iowait idle steal %System% %
3.34 0.00 6.66 0.83 89.17 0.00

Feature: GST Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
SDA 107,56 2544.64 3140,34 8084953177 9977627424
sda1 0.00 0.00 0.65 2074066 16
sda2 21.57 220.59 1833,98 700856482 5827014296
sda3 0.00 0.00 0.00 12787 5960
sda4 0.00 0.00 0.00 8-0
sda5 2.75 0.69 15,07 8739194 47874000
sda6 0.05 0.00 0.55 5322 1736264
sda7 0.00 0.00 0.00 2915 16
sda8 0.50 9.03 5.24 28695700 16642584
sda9 0.51 0.36 24.81 1128290 78829224
sda10 0.52 5.98 0.00 9965 19004088
sda11 83,71 2311.26 1254,71 7343426336 3986520976



[root@myserver ~] # hdparm - tT/dev/sda11

/ dev/sda11:
Timing cached reads: 10708 MB in 2.00 seconds = 5359,23 MB / s
Calendar of the reading disc in the buffer: 540MO to 3.00 seconds = 179,89 MB / s




[root@myserver ~] # r-s u o 1 6 datafile
Linux 2.6.18 - 194.el5 (mca-webreporting2) 01/06/2012

09:57:19 CPU user nice % % iowait idle steal %System% %
09:57:20 6.97 0.00 all 1.87 16.31 74.84 0.00
09:57:21 6.74 0.00 all 1.25 17,48 74,53 0.00
09:57:22 7.01 0.00 all 1.75 16.27 74.97 0.00
09:57:23 6.75 0.00 all 1.12 13.88 78.25 0.00
09:57:24 6.98 0.00 all 1.37 16.83 74.81 0.00
09:57:25 6.49 0.00 all the 1.25 14.61 77.65 0.00
Average: all 6.82 0.00 1.44 15.90 75.84 0.00




[root@myserver ~] # r-s u o 1 6 datafile
Linux 2.6.18 - 194.el5 (mca-webreporting2) 01/06/2012

09:57:19 CPU user nice % % iowait idle steal %System% %

MCA-webreporting2; 601; 2012-05-27 16:30:01 UTC 2.54; 1510.94; 3581.85; 0.00
MCA-webreporting2; 600; 2012-05-27 16:40:01 UTC 2.45; 1442.78; 3883.47; 0.04
MCA-webreporting2; 599; 2012-05-27 16:50:01 UTC 2.44; 1466.72; 3893.10; 0.04
MCA-webreporting2; 600; 2012-05-27 17:00:01 UTC; 1394.43; 3546.26; 2.30 0.00
MCA-webreporting2; 600; 2012-05-27 17:10:01 UTC; 1529.72; 3978.27; 3.15 0.04
MCA-webreporting2; 601; 2012-05-27 17:20:01 UTC 9,83; 1268.76; 3823.63; 0.04
MCA-webreporting2; 600; 2012-05-27 17:30:01 UTC; 1277.93; 3495.32; 32,71 0.00
MCA-webreporting2; 600; 2012-05-27 17:40:01 UTC, 1.96; 1213.10; 3845.75; 0.04
MCA-webreporting2; 600; 2012-05-27 17:50:01 UTC; 1247.98; 3834.94; 1.89 0.04
MCA-webreporting2; 600; 2012-05-27 18:00:01 UTC; 1184.72; 3486.10; 2.24 0.00
MCA-webreporting2; 600; 2012-05-27 18:10:01 UTC; 1320.73; 4088.14; 18.68 0.18
MCA-webreporting2; 600; 2012-05-27 18:20:01 UTC; 1137.28; 3784.99; 1.82 0.04


[root@myserver ~] # vmstat
System procs - memory - swap - io - cpu -.
If free buff cache TR bi of the swpd b r bo in cs us sy id wa st
0 0 1 182356 499444 135348 13801492 0 0 3488 247 0 0 5 2 89 4





[root@myserver ~] # dstat sda d
-total-cpu-usage - dsk/sda -net/total - pagination - system.
usr sys idl wai hiq siq | read short | recv send | out | CSW int
3 1 89 7 0 0 | 1240 1544 kaka | 0 0 | 1.9 B 1 B | 2905 6646
8 1 77 14 0 1 | 4096 b 3616 k | 433 k 2828B | 0 0 | 3347 16 k
10 2 77 12 0 0 | 0 k 1520 | 466 k 1332B | 0 0 | 3064 15 k
8 2 77 12 0 0 | 0 2060 k | 395 k 1458B | 0 0 | 3093 14 k
8 1 78 12 0 0 | 0 1688 k | 428 k 1460B | 0 0 | 3260 15 k
8 1 78 12 0 0 | 1712 0 k | 461 k 1822B | 0 0 | 3390 15 k
7 1 78 13 0 0 | 4096 b 6372 k | 449 k 1950 | 0 0 | 3322 15 k






Leaves AWR
Wait events
waiting time-controlled desc, waits desc (idle last events)
------------------------------------------------------------------------
Event wait % Time - out of the queue time Total (s) Avg wait /txn (ms) waiting
buffer without waiting for 1 591 125 99.95 19 814 12 129.53
log file parallel write 31 668 0.00 1 413 45 2.58
buffer busy waits 846 77,07 653 772 0.07
control file parallel write 10 166 0.00 63 636 0.83
Synchronize file journal 0.00 11 301 565 50 0.92
write complete waits 218 94.95 208 955 0.02





SQL > select 'free in a buffer (NOT_DIRTY)', round (((select count (DIRTY) N_D v$ bh where DIRTY = 'n') * 100) / (select count (*) from v$ bh), 2) | ' %' DIRTY_PERCENT of the double
Union
2 3 select "keep in the buffer (YES_DIRTY)', round (((select count (DIRTY) N_D v$ bh where DIRTY = 'Y') * 100) / (select count (*) from v$ bh), 2) | ' %' Double DIRTY_PERCENT;


"FREEINBUFFER (NOT_DIRTY)" DIRTY_PERCENT
--------------------------- -----------------------------------------
free in the buffer (NOT_DIRTY) 10.71%
Keep buffer (YES_DIRTY) 89,29%





Cloth...

Published by: 928992 on 1 June 2012 10:35

You can do direct path inserts to improve the management of the buffer with sqldr.
Please find in the documentation and you will see that you can do this with your current file of the sqldr control.
You may need to ALTER TABLE... NOLOGGING before running sqldr and then ALTER TABLE... RECORDING subsequently
Simon

Tags: Database

Similar Questions

  • Insert data as XML into the Oracle Table

    Hi all

    I have a requirement where the data in XML format, and I need to insert into the Oracle Table. For example, I get XML data in the following format,
    < results >
    < row >
    < BANK_ACCOUNT_ID > 10010 < / BANK_ACCOUNT_ID >
    < BANK_ID > 300968 < / BANK_ID >
    Vision operations < LEGAL_ENTITY > < / LEGAL_ENTITY >
    < BANK_NAME > BofA < / BANK_NAME >
    < BANK_ACCOUNT_NUM > 10271-17621-619 < / BANK_ACCOUNT_NUM >
    < BANK_ACCOUNT_NAME > BofA-204 < / BANK_ACCOUNT_NAME >
    < BRANCH_NAME > New York < / BRANCH_NAME >
    USD < CURRENCY_CODE > < / CURRENCY_CODE >
    < BALANCE_DATE > 2007 - 11 - 09 < / BALANCE_DATE >
    < LEDGER_BALANCE > 432705900.56 < / LEDGER_BALANCE >
    < / row >
    < row >
    < BANK_ACCOUNT_ID > 10091 < / BANK_ACCOUNT_ID >
    < BANK_ID > 300984 < / BANK_ID >
    Vision industries < LEGAL_ENTITY > < / LEGAL_ENTITY >
    Barclay Bank < BANK_NAME > < / BANK_NAME >
    < BANK_ACCOUNT_NUM > 70986798 < / BANK_ACCOUNT_NUM >
    Bank Multi currency-626 < BANK_ACCOUNT_NAME > Barclays < / BANK_ACCOUNT_NAME >
    Reading < BRANCH_NAME > < / BRANCH_NAME >
    GBP < CURRENCY_CODE > < / CURRENCY_CODE >
    < BALANCE_DATE > 2007 - 11 - 14 < / BALANCE_DATE >
    < LEDGER_BALANCE > 24244085.24 < / LEDGER_BALANCE >
    < / row >
    < row >
    < BANK_ACCOUNT_ID > 10127 < / BANK_ACCOUNT_ID >
    < BANK_ID > 300968 < / BANK_ID >
    < LEGAL_ENTITY > SSC U.S. 01 < / LEGAL_ENTITY >
    < BANK_NAME > BofA < / BANK_NAME >
    < BANK_ACCOUNT_NUM > 4898744 < / BANK_ACCOUNT_NUM >
    < BANK_ACCOUNT_NAME > BofA SSC U.S. 02-7188 < / BANK_ACCOUNT_NAME >
    < BRANCH_NAME > New York < / BRANCH_NAME >
    USD < CURRENCY_CODE > < / CURRENCY_CODE >
    < BALANCE_DATE > 2007 - 11 - 28 < / BALANCE_DATE >
    < LEDGER_BALANCE > 10783815.28 < / LEDGER_BALANCE >
    < / row >
    < / results >

    I like to write PLSQL code that will receive these data with XML tags and insert it into the Oracle Table. Is this possible with built-in XML features provided in the Oracle database?

    Please Guide...

    Kind regards
    Priyanka

    But the problem is the file XML is to have the details of the records if you carefully observed the XML file. But by using more high statement select I get output in the following format.
    ORG_ID REQ_LINE PO_NUMBER EXPECTED_REC_QTY USER_NAME REQ_NUMBER
    204204 1444714450 11 64446445 11 OPERATIONSOPERATIONS

    The table has only one row, so you get a single row as output.
    I'm surprised that you find useful examples showing how to divide the data into several lines.

    (1) create the table with the following option, it will optimize the performance of storage and query for large XML documents:

    CREATE TABLE xxios_xml_data_test(xml_data XMLTYPE)
    XMLTYPE COLUMN xml_data STORE AS SECUREFILE BINARY XML
    ;
    

    (2) interview table with:

    SQL> select x.*
      2  from xxios_xml_data_test t
      3     , xmltable(
      4         '/Results/Row'
      5         passing t.xml_data
      6         columns ORG_ID           number       path 'ORG_ID'
      7               , REQ_NUMBER       number       path 'REQ_NUMBER'
      8               , REQ_LINE         number       path 'REQ_LINE'
      9               , PO_NUMBER        number       path 'PO_NUMBER'
     10               , EXPECTED_REC_QTY number       path 'EXPECTED_REC_QTY'
     11               , USER_NAME        varchar2(30) path 'USER_NAME'
     12       ) x
     13  ;
    
        ORG_ID REQ_NUMBER   REQ_LINE  PO_NUMBER EXPECTED_REC_QTY USER_NAME
    ---------- ---------- ---------- ---------- ---------------- ------------------------------
           204      14447          1       6444                1 OPERATIONS
           204      14450          1       6445                1 OPERATIONS
     
    
  • Convert flat file to XML document and store it in the Oracle database

    First of all:
    I have a flatfile and created an external table to read this file in Oracle
    Now, I want to create an XML document for each line and insert in the Oracle database, I think as XMLtype.
    Could you please give me some information/steps.

    Second:
    Are there performance issues, because every day, I need to check that the XML document stored in the database against the next file.
    Thank you.

    I won't tell it not in the same words that Marco used, but your solution is impassable and an invitation for bad things to happen.

    Wait miserable performance, and you will not be disappointed.

    The concept of total flexibility works up a code that you depend on has no idea what to do with what is playback.
    Will happen to enough short term and is roughly the equivalent of the absurdity of Java to be independent of the database.

    I would recommend you take the concept and consider, with your data volumes, something more likely to succeed.

  • SΔ DG of mysql to oracle very slow for inserts

    services of het configured on the gateway to oracle to mysql 5.6 11.2.0.4

    Have a table I want you store in oracle.  1000 lines.

    On mysql: create view vw_mysql_t1 as select my_mysql_table columns.

    Create on Oracle: view Vw_ora as select vw_mysql_t1@mysql_link columns

    On oracle: select * from vw_ora data return data in 3-4 seconds.

    However, try an insert for more data

    insert into a_table_on_oracle

    (select * from vw_ora)

    It takes 11-12 minutes.

    create table as or insert into the same performance.  Tried to insert only 1 line and the same performance 11-12 minutes.  any ideas?

    I found the answer in the do not generate trace file AND the problem of performance here

    slow dg4msql queries

    Our listener is configured to run as a user of the GRID.  Oracle home is owner by default ORACLE user.  GRID had no permissions to write the trace file in ORACLE_HOME/hs/log directory.

    chmod-R $777 ORACLE_HOME/hs/log

    Then the trace file generated.  When I started to watch it, the plot was already.  somebody did note in this post that tracing can create problems with performance.  I never even thought to try it without tracing, so I changed the tracing off and all performance problems went away.      Thanks for your help Mike.  do you good work.

  • How to insert the output in the Oracle database table records

    Nice day

    I have two tables (table A and table B) in my oracle database I created a process for mapping from Table A duplicate records to Table B, and the result (reports) must be inserted into the Table B. I can't make this process. Can someone help me please.

    Thank you and best regards,

    Muhammed Faraz

    Hi Muhammed,

    You will need create an export job and set up a new job as a result. Take a look in the help topic "export data" as he will explain the different options [Add/Remove and insert/etc.].

    Thank you

    Nick

  • Oracle 12 c - unexpected result with the insertion of the DBA_VIEWS view

    Hello

    I try inserting the DBA_VIEWS fields in a table belonging to a common C a PDB file ##SA user:

    (a) the PDB PDBORCL using user C ##SA connection:

    SQL * more: Production of liberation 12.1.0.1.0 kills him Sep 10 16:21:39 2013

    Copyright (c) 1982, 2013, Oracle.  All rights reserved.

    Enter the password:

    Last successful login time: kills Sep 10-2013 16:18:26 + 02:00

    Connected to:

    Database Oracle 12 c Enterprise Edition Release 12.1.0.1.0 - 64 bit Production

    With the options of partitioning, OLAP, advanced analytics and Real Application Testing

    C##SA@pdborcl 10.09.2013 > see the con_name

    CON_NAME

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

    PDBORCL

    C##SA@pdborcl 10.09.2013 > see the con_id

    CON_ID

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

    3

    (b) I create the table user SA_VIEWS_V

    C##SA@pdborcl 10.09.2013 > select count (*) in the dba_views;

    COUNT (*)

    ----------

    6220

    1 selected line.

    C##SA@pdborcl 10.09.2013 > create table sa_views_v (owner varchar2 (128), view_name varchar2 (128));

    Table created.

    (c) the insertion in the table SA_VIEWS_V gave me only 65 rows at the same time lines of content 6220 dba_views:

    C##SA@pdborcl 10.09.2013 > INSERT INTO SA_VIEWS_V (OWNER, VIEW_NAME) SELECT MASTER, VIEW_NAME DBA_VIEWS;

    65 lines were created.

    C##SA@pdborcl 10.09.2013 > commit;

    Validation complete.

    C##SA@pdborcl 10.09.2013 > SELECT MASTER, VIEW_NAME DBA_VIEWS;

    ...

    IX

    IX

    IX

    SH

    6220 selected lines.

    (d) you will find above the executed plan of the insert and the single select statement:

    C##SA@pdborcl 10.09.2013 > select * from table (dbms_xplan.display_cursor ('aj3vkggtvv9d9'));

    PLAN_TABLE_OUTPUT

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

    SQL_ID, aj3vkggtvv9d9, number of children 0

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

    INSERT INTO SA_VIEWS_V (OWNER, VIEW_NAME) SELECT VIEW_NAME, MASTER OF

    DBA_VIEWS

    Hash value of plan: 1585970530

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

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

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

    |   0 | INSERT STATEMENT.                  |       |       |   136 (100) |          |

    |   1.  LOAD TABLE CLASSIC |                  |       |       |            |          |

    |*  2 |   FILTER                         |                  |       |       |            |          |

    |*  3 |    HASH JOIN |                  |    65.  6045.   136 (0) | 00:00:01 |

    |*  4 |     HASH JOIN |                  |    65.  4875.   132 (0) | 00:00:01 |

    |   5.      NESTED LOOPS |                  |       |       |            |          |

    |   6.       NESTED LOOPS |                  |    65.  3315 |   131 (0) | 00:00:01 |

    |   7.        INDEX SCAN FULL | I_VIEW1 |    65.   325.     1 (0) | 00:00:01 |

    |*  8 |        INDEX RANGE SCAN | I_OBJ1 |     1.       |     1 (0) | 00:00:01 |

    |   9.       TABLE ACCESS BY INDEX ROWID | OBJ$             |     1.    46.     2 (0) | 00:00:01 |

    |  10.      INDEX SCAN FULL | I_USER2 |   131.  3144 |     1 (0) | 00:00:01 |

    |  11.     TABLE ACCESS FULL | USER$ |   131.  2358.     4 (0) | 00:00:01 |

    | * 12 |    TABLE ACCESS FULL | USER_EDITIONING$ |     1.     6.     2 (0) | 00:00:01 |

    |  13.    SEMI NESTED LOOPS.                  |     1.    29.     2 (0) | 00:00:01 |

    | * 14 |     INDEX SKIP SCAN | I_USER2 |     1.    20.     1 (0) | 00:00:01 |

    | * 15 |     INDEX RANGE SCAN | I_OBJ4 |     1.     9.     1 (0) | 00:00:01 |

    | * 16.    TABLE ACCESS FULL | USER_EDITIONING$ |     1.     6.     2 (0) | 00:00:01 |

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

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

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

    2 filter (((IS NULL AND "O". ("TYPE #" <>88) OR BITAND ("O". ("" FLAGS ", 1048576) = 1048576 OR

    BITAND ("U". "" SPARE1»(, 16) = 0 OR (((SYS_CONTEXT ('userenv', 'current_edition_name') = ' ORA$ BASE ", AND)))"

    "U"." TYPE #"(<>2) OR ('U'." ' TYPE # '= 2 AND 'U'. "SPARE2" = TO_NUMBER (SYS_CONTEXT ('userenv ',' current_e)) "

    dition_id'))) or IS NOT NULL) AND IS NOT NULL)))

    3 - access("O".") SPARE3 '=' U '. ("" USER # ")

    4 - access("O".") "OWNER # '=' U '. ("" USER # ")

    8 - access("O".") ' OBJ # '=' V '. (' ' OBJ # ")

    12 filter (("TYPE #" =: B1 ET "UE".)) "THE USER #" =:B2))

    14 - access("U2".") TYPE # "= 2, AND"U2"." SPARE2 "= TO_NUMBER (SYS_CONTEXT ('userenv ',' current_editi))"

    on_id')))

    filter (("U2". "TYPE #"= 2, AND "U2"."" SPARE2 "= TO_NUMBER (SYS_CONTEXT ('userenv ',' current_edit))"

    ion_id')))

    15 - access("O2".") DATAOBJ #"=: B1 AND 'O2'." ' TYPE # '= 88 AND 'O2'. "OWNER #"= "U2". ("" USER # ")

    16 filter ((' EU'. "TYPE #" =: B1 AND 'EU '. "THE USER #" =:B2))

    47 selected lines.

    C##SA@pdborcl 10.09.2013 > select * from table (dbms_xplan.display_cursor ('bc4f1jh1snwdp'));

    PLAN_TABLE_OUTPUT

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

    SQL_ID, bc4f1jh1snwdp, number of children 0

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

    SELECT THE OWNER, DBA_VIEWS NOM_DE_VUE

    Hash value of plan: 1508506130

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

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

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

    |   0 | SELECT STATEMENT |                  |       |       |     1 (100) |       |       |

    |   1.  PARTITION LIST ALL |                  | 10000 |  1289K |     0 (0) |     1.     2.

    |   2.   TABLE FIXED FULL | X$ COMVW$ 5885ef62 | 10000 |  1289K |     0 (0) |       |       |

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

    14 selected lines.

    You have an idea about this result?

    Thank you in advance,

    Arnaud.

    Arnaud,

    This has a fairly simple explanation.

    In 12cR1, there are common objects, and there are local objects. The definition of a common object is stored in the ROOT, and only a stub for the object is stored in the PDB. The definition of a local object is stored in the PDB.

    When DBA_VIEWS is questioned in a PDB file, so we must return to lines of views both as common as the result of the query. If views Commons are not returned, then several views that a client is used to see in the result of a query DBA_VIEWS to 11.2 and earlier versions not will be seen in paragraph 12.1. For example, ALL_TABLES, DBA_OBJECTS, etc.

    When DBA_VIEWS is questioned in a PDB file, then we extraction of lines for local opinions of PDB and common views of ROOT lines. The first has value ORIGIN_CON_ID equal to the ID of the container of the PDB to which you are connected, and they value ORIGIN_CON_ID equal to the ID of the ROOT container. Given that the recovery of these lines should be done in two different containers, we go through a fixed table X$ COMVW$ *.

    The gap that you are experiencing is because this fixed table based assessment is used only to SELECT and not for etc. SELECT, INSERT AS SELECT, CREATE TABLE AS.

    Let me know if that makes sense.

    Thank you

    Thomas

  • How to insert vidio file in the oracle database

    Hi Experts,

    Can you please tell me, how to insert video in the oracle database.
    and what are the formats it supports.

    Thanks in advance,
    Sanjeev,

    To do this, you don't need an expert, you only need the capacity and the ability to googleor search this forum.
    This question was asked here several times by people who, like you, have refused to use online resources.

    ----------
    Sybrand Bakker
    Senior Oracle DBA

  • How to run a function in the oracle plsql object when the object dies

    I have an object plsql function member as exec_last.
    I want this procedure that is called when the plsql object is cleaned or when the accommodation session this object dies.

    In C, we have a system call as atexit(). Is there such a feature in Oracle 10 g or no workaround using embedded java.

    This feature is required to empty the contents stored in the plsql in the object to the database, when the program terminates.

    Thank you
    Best regards,
    Navin Srivastava

    navsriva wrote:

    Is there a better way to cache in memory.

    What is the Oracle buffer cache? It is exactly that - a cache for data blocks. The two new blocks (created by inserting new rows) and existing blocks (used by selects, updates and deletions and reused (freespace) inserts).

    The Oracle buffer cache is a cache of very mature and sophisticated. Trying to do "+ best +" to the db, buffer cache in another layer of software (such as PL/SQL) is mostly a waste of time and resources... and invariable introduced another layer of s/w which simply increases the number of moving parts. This in turn usually means increased complexity and slow performance.

    Why use the treatment in bulk from PL/SQL? The basic answer is to reduce switching between the PL and engine SQL context.

    During the execution of a code to insert data in SQL, the data must be passed to the SQL engine, PL PL engine must perform a context to the SQL engine switch so that it can process these data and execute the SQL statement.

    If there is a 1000 lines of inserts, this means that a 1000 context switches.

    In bulk treatment makes the "+ pipe communication / data + ' between the two biggest ones. Instead of passing data from one line to the SQL engine via a context switch, a collection of in bulk / picture of a 100 lines is passed. There are now only 10 changes of context necessary to push this 1000 lines of the PL engine to the SQL engine.

    You can do the same on any other client SQL... (remember, that the PL itself is also a SQL client). You can, using C/C++ for example, do exactly the same thing. When the row data to the SQL engine to insert, pass a collection of 100 rows instead of the data for a single line.

    The exact result of the same benefits as in PL/SQL. A pipe communication more, allowing more data to be transferred to and from the SQL, with engine for result less context switching.

    Of course, a context switch ito C/C++ is much more expensive than in PL/SQL - as the engine PL is located in the same physical process as the SQL engine. Using C/C++, this will usually be a separate process, to communicate with the SQL engine on the network process.

    The same applies to other languages, such as Java, c#, Delphi, Visual Basic, and so on.

    It not be wise to introduce another layer of s/w, the motor of PL/SQL and the customer "+ insert +" stored in his memory structures... and then use the PL engine to '+ flower' + for the SQL engine via a process control in bulk.

    It will be faster and more scalable, have the language of the client with treatment directly and dealing with the SQL engine directly in bulk.

    Simple example. What is SQL * Loader program (written in C), use? It uses no PL as a proxy to move data from a CSV file into a SQL table. He calls SQL directly. It uses a treatment in bulk. It is very fast to load data.

    There is an exception to this rule. What PL is used as a layer of processing and validation of business. Instead of the client code, implementation of this logic, it is done using LP. The customer then will not is more manually add an invoice to the table of the INVOICES for example. He called the procedure of PL/SQL AddNewInvoice instead - and this procedure does everything. It checks the valid client code. Ensures that there are stocks of the products ordered on the invoice. Etc.

    But in this scenario, PL is not used a flea market "buffer cache. It is used for what it was designed for - a correct application inside the database layer.

  • SSRS for lack of outer join with the Oracle data source

    It seems to be a problem with the Oracle driver used in the Reporting SERVICES query designer.

    When you use an Oracle data source, if I create an outer join in the graphic designer, it automatically inserts '{OJ' before the join and '} ' after her.  This is an incorrect syntax for Oracle and refuses to start.  The curly braces and the JO editable in designer text, but if I go back to the graphic designer and immediately to reintegrate them.

    Only, this has started to happen a year or two ago - before that it worked, but with the old (+) syntax.

    Can it not be healed?  It makes things very difficult.

    -Geoff

    Hi Geoff,

    Thanks for posting in the Microsoft Community.

    However, the question you posted would be better suited in the Forums of the Oracle Support; We recommend that you post your query in Oracle Support Forums to get help:

    https://forums.Oracle.com/forums/main.jspa;JSESSIONID=8d92100c30d8fb401bcbd10b46c38c9ddf1a3242549a.e34SbxmSbNyKai0Lc3mPbhmSc3aNe0? CategoryID = 84

    If you have any other questions or you need Windows guru, do not hesitate to post your questions and we will be happy to help you.

  • "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.

  • I create a form based on two tables that have sequences also. When I create insert only row is inserted in the fields in table first and second fields of the table are empty. Why?

    Mr President.

    I create a form based on two tables that have sequences also. When I create insert only row is inserted in the fields in table first and second fields of the table are empty. Why?

    formdoubletables.png

    the page source is

    <?xml version='1.0' encoding='UTF-8'?>
    <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                    xmlns:f="http://java.sun.com/jsf/core">
      <af:panelFormLayout id="pfl1">
        <af:group id="Group">
          <af:inputText value="#{bindings.VoucherId.inputValue}" label="#{bindings.VoucherId.hints.label}"
                        required="#{bindings.VoucherId.hints.mandatory}" columns="#{bindings.VoucherId.hints.displayWidth}"
                        maximumLength="#{bindings.VoucherId.hints.precision}"
                        shortDesc="#{bindings.VoucherId.hints.tooltip}" id="it1">
            <f:validator binding="#{bindings.VoucherId.validator}"/>
            <af:convertNumber groupingUsed="false" pattern="#{bindings.VoucherId.format}"/>
          </af:inputText>
          <af:inputDate value="#{bindings.VoucherDate.inputValue}" label="#{bindings.VoucherDate.hints.label}"
                        required="#{bindings.VoucherDate.hints.mandatory}"
                        columns="#{bindings.VoucherDate.hints.displayWidth}"
                        shortDesc="#{bindings.VoucherDate.hints.tooltip}" id="id1">
            <f:validator binding="#{bindings.VoucherDate.validator}"/>
            <af:convertDateTime pattern="#{bindings.VoucherDate.format}"/>
          </af:inputDate>
          <af:inputText value="#{bindings.Credit.inputValue}" label="#{bindings.Credit.hints.label}"
                        required="#{bindings.Credit.hints.mandatory}" columns="#{bindings.Credit.hints.displayWidth}"
                        maximumLength="#{bindings.Credit.hints.precision}" shortDesc="#{bindings.Credit.hints.tooltip}"
                        id="it2">
            <f:validator binding="#{bindings.Credit.validator}"/>
          </af:inputText>
        </af:group>
        <af:group id="g1">
          <af:inputText value="#{bindings.Lineitem.inputValue}" label="#{bindings.Lineitem.hints.label}"
                        required="#{bindings.Lineitem.hints.mandatory}" columns="#{bindings.Lineitem.hints.displayWidth}"
                        maximumLength="#{bindings.Lineitem.hints.precision}" shortDesc="#{bindings.Lineitem.hints.tooltip}"
                        id="it3">
            <f:validator binding="#{bindings.Lineitem.validator}"/>
            <af:convertNumber groupingUsed="false" pattern="#{bindings.Lineitem.format}"/>
          </af:inputText>
          <af:inputText value="#{bindings.VoucherId1.inputValue}" label="#{bindings.VoucherId1.hints.label}"
                        required="#{bindings.VoucherId1.hints.mandatory}"
                        columns="#{bindings.VoucherId1.hints.displayWidth}"
                        maximumLength="#{bindings.VoucherId1.hints.precision}"
                        shortDesc="#{bindings.VoucherId1.hints.tooltip}" id="it4">
            <f:validator binding="#{bindings.VoucherId1.validator}"/>
            <af:convertNumber groupingUsed="false" pattern="#{bindings.VoucherId1.format}"/>
          </af:inputText>
          <af:inputText value="#{bindings.Debit.inputValue}" label="#{bindings.Debit.hints.label}"
                        required="#{bindings.Debit.hints.mandatory}" columns="#{bindings.Debit.hints.displayWidth}"
                        maximumLength="#{bindings.Debit.hints.precision}" shortDesc="#{bindings.Debit.hints.tooltip}"
                        id="it5">
            <f:validator binding="#{bindings.Debit.validator}"/>
          </af:inputText>
          <af:inputText value="#{bindings.Credit1.inputValue}" label="#{bindings.Credit1.hints.label}"
                        required="#{bindings.Credit1.hints.mandatory}" columns="#{bindings.Credit1.hints.displayWidth}"
                        maximumLength="#{bindings.Credit1.hints.precision}" shortDesc="#{bindings.Credit1.hints.tooltip}"
                        id="it6">
            <f:validator binding="#{bindings.Credit1.validator}"/>
          </af:inputText>
          <af:inputText value="#{bindings.Particulars.inputValue}" label="#{bindings.Particulars.hints.label}"
                        required="#{bindings.Particulars.hints.mandatory}"
                        columns="#{bindings.Particulars.hints.displayWidth}"
                        maximumLength="#{bindings.Particulars.hints.precision}"
                        shortDesc="#{bindings.Particulars.hints.tooltip}" id="it7">
            <f:validator binding="#{bindings.Particulars.validator}"/>
          </af:inputText>
          <af:inputText value="#{bindings.Amount.inputValue}" label="#{bindings.Amount.hints.label}"
                        required="#{bindings.Amount.hints.mandatory}" columns="#{bindings.Amount.hints.displayWidth}"
                        maximumLength="#{bindings.Amount.hints.precision}" shortDesc="#{bindings.Amount.hints.tooltip}"
                        id="it8">
            <f:validator binding="#{bindings.Amount.validator}"/>
            <af:convertNumber groupingUsed="false" pattern="#{bindings.Amount.format}"/>
          </af:inputText>
        </af:group>
        <f:facet name="footer">
          <af:button text="Submit" id="b1"/>
          <af:button actionListener="#{bindings.CreateInsert.execute}" text="CreateInsert"
                     disabled="#{!bindings.CreateInsert.enabled}" id="b2"/>     
          <af:button actionListener="#{bindings.Commit.execute}" text="Commit" disabled="#{!bindings.Commit.enabled}"
                     id="b3"/>
          <af:button actionListener="#{bindings.Rollback.execute}" text="Rollback" disabled="#{!bindings.Rollback.enabled}"
                     immediate="true" id="b4">
            <af:resetActionListener/>
          </af:button>
        </f:facet>
      </af:panelFormLayout>
    </ui:composition>
    
    
    
    

    Concerning

    Go to your VO Wizard, select the tab of the entity and to check if both the EO is editable or not.

    See you soon

    AJ

  • How to perform an addition of column values in an insert query that would insert in the 3rd column, and the values how to insert into another table.

    I have two tables (2) RESULT TAB (1)

    CREATE TABLE TAB

    (

    NUMBER OF SNO

    A NUMBER,

    B THE NUMBER.

    NUMBER OF THE SUM

    );

    CREATE AN ARRAY OF RESULT

    (

    NUMBER OF SNO

    NUMBER OF THE SUM

    )

    my doubt is:

    (1) I want to insert a table TAB, my question is how to insert a column to the SUM using the column A AND B... Here im adding two values of the column and store result in the AMOUNT column.

    SNO   A  SUM           

    1 100 150 250

    2 300 100 400

    I want to like this, it is possible with single insert query?


    (2) at the time of the insertion TAB of values that SNO, and the values of table TAB $ insert in the table of RESULTS... is it possible these two inserts at the same time?

    in fact, im using another this table.fro TAB and easy to understand I write like that, please solve this problem

    First, you post in the wrong forum as this one is only for Oracle's SQL developer tool. So you might ask your question in the general forum of SQL.

    Second, you might solve your problems with bind variable:

    Insert tab

    (sno, a, b, sum)

    values

    (: SNO,: A: B: A + B :))

    You should not use sum as column name because it is a reserved word.

    More you cannot insert into two different tables with a single SQL, but you can use PL/SQL to do this:

    Start

    insert into tab values (: SNO,: A: B: A + B :);)

    insert into result values (: SNO,: A + B :);)

    end;

    If you meet sno from a sequence, you could do something like this:

    Start

    insert into values tab (seq_sno.nextval,:,: B,: A +: B) return sno in: SNO.

    insert into result values (: SNO,: A + B :);)

    end;

    Hope that helps,

    dhalek

  • Need help on the text of the Oracle

    Hi Master,

    I'm working on the text of the Oracle. I executed the step/commands below. All are executed successfully. But I saw no improvement in my work. But I have a doubt, explain below.

    create the table ent_dnt in select * from entitlement_dnt;

    BEGIN

    CTX_DDL. CREATE_PREFERENCE ("oracletext_datastore", "MULTI_COLUMN_DATASTORE");

    CTX_DDL. SET_ATTRIBUTE

    ("oracletext_datastore", "COLUMNS",

    "ORDER_NUMBER, GENERIC_PRODUCT_NAME_EXT, ENTITLEMENT_REF_ID, DEVICE_ASSET_ID, DEVICE_UNIQUE_ID, SWSERVICETAG, PRODUCT_DESC');

    END;

    CREATE INDEX idx_oracle_text

    ON Ent_dnt (search_cols)

    INDEXTYPE IS CTXSYS. FRAMEWORK

    PARAMETERS ("DATASTORE oracletext_datastore");

    BEGIN

    DBMS_STATS. GATHER_TABLE_STATS ('EE', 'ent_DNT', cascade = > TRUE);

    DBMS_STATS. GATHER_TABLE_STATS ('EE', 'upd_DNT', cascade = > TRUE);

    DBMS_STATS.gather_index_stats ('EE', 'idx_oracle_text1');

    DBMS_STATS.gather_index_stats ('EE', 'idx_oracle_text');

    END;

    the steps above are created / executed successfully. But when to run my select query... I did not see anywhere oracle text index name in my plan to explain.

    Plan

    SELECT STATEMENT ALL_ROWSCost: 28 393 bytes: 49 675 cardinality: 5

    3 TRI GLOBAL bytes: cardinality 8: 1

    TABLE ACCESS BY INDEX ROWID TABLE EA 2. EE_PROD_GRP_ENTITLEMENT cost: 4 bytes: 8 Cardinality: 1

    1 INDEX RANGE SCAN INDEX EE. IDX_PGE_ENT_ID cost: cardinality 3: 1

    5 SORTING GLOBAL bytes: cardinality 8: 1

    TABLE 4 TABLE EA FULL ACCESS. ENT_DNT cost: 26 781 bytes: 8 Cardinality: 1

    20 SEE EE. Cost: 28 393 bytes: 49 675 cardinality: 5

    19 STOPKEY COUNTY

    18 SEE EE. Cost: 28 393 bytes: 49 610 cardinality: 5

    GROUP 17 SORT BY STOPKEY cost: 28 393 bytes: 2 295 cardinality: 5

    the HASH JOIN cost EXTERNAL 16: 28 392 bytes: 2 295 cardinality: 5

    Cost EXTERNAL 14 NESTED LOOPS: 28 388 bytes: 1 808 cardinality: 4

    Cost EXTERNAL 11 NESTED LOOPS: cardinality 28 384 bytes: 1 600: 4

    Cost of 8 HASH JOIN: 28 383 bytes: 1 552 cardinality: 4

    TABLE 6 TABLE EA FULL ACCESS. UPD_DNT cost: 1 089 bytes: 174 cardinality: 6

    TABLE 7 TABLE EA FULL ACCESS. ENT_DNT cost: 27 292 bytes: 110,648,108 cardinality: 308 212

    TABLE ACCESS BY INDEX ROWID EE TABLE 10. PRODUCT_LICENSE_PART cost: 1 bytes: cardinality 1: 12

    9 INDEX RANGE SCAN INDEX EE. IDX_PLP_PD_DATA_ID cost: cardinality 0: 1

    TABLE ACCESS BY INDEX ROWID EE TABLE 13. PD_KT_DETAILS cost: 1 bytes: cardinality 1: 52

    12 INDEX RANGE SCAN INDEX EE. IDX_PKD_PART_NUM cost: cardinality 0: 1

    TABLE 15 TABLE EA FULL ACCESS. Cost LEGACY_CONFIG: 03:00 cardinality: 5

    and cost is so high. But when I ran the query below. I saw no table $.

    TEST@orcl_11gR2 > SELECT object_name, object_type

    2 FROM user_objects

    3. WHERE object_name LIKE '% oracle % '.

    4.

    Usually DR$ $I $K, $N, $R, $X tables aren't creaed. where is the problem? Please help me. I perform this task.

    Concerning

    AR

    3. I L 36 records on the ent_dnt table... I added another 1 lakh records more... This index is does it work properly? or should I update again?

    As long as you use SYNC (ON COMMIT) each ecord you insert is indexed immediately after you have posted.  This will result in gradually increasing index fragmentation, you OPTIMIZE the index or ALTER and REBUILD the index or DROP and RE-CREATE the index to reduce fragmentation and keep the queries that use CONTAINS to run fast.  How many times you need to do this depends on how many times you insert the amount of data.

    Also, if you update data, then you must make sure that whenever you do an update, you update the column that the index is created as search_cols, in order to trigger the synchronization.  That you updated the search_cols to is okay, as long as it is updated.  For example, you might be updated to U.

  • ODI - read CSV file and write to the Oracle table

    Hello world

    After 4 years, I started to work again with ODI, and I'm completely lost.

    I need help, I don't know what to use for each step, interfaces, variables, procedures...

    What I have to do is the following:

    (1) reading a CSV file-> I have the topologies and the model defined

    (2) assess whether there is a field of this CSV file in TABLE A-> who do not exist in the table is ignored (I tried with an interface joining the csv with the TABLE model a model and recording the result in a temporary data store)

    Evaluate 3) I need to update TABLE C and if not I need to INSERT if another field that CSV exists in TABLE B-> if there

    Could someone help me with what use?

    Thanks in advance

    Hi how are you?

    You must:

    Create an interface with the CSV template in the source and a RDBM table in the target (I'll assume you are using Oracle). Any type of filter or the transformation must be defined to be run in the stadium. (you must use a LKM for SQL file and add an IKM Sql control (it is best to trim them and insert the data when it cames to a file if you want after this process, you may have an incremental update to maintain history or something like that).)

    For validation, you will use a reference constraints in the model of the oracle table: (for this you need a CKM Oracle to check constraints)

    Then, you must select the table that you sponsor and in the column, you choose which column you will match.

    To article 3, you repeat the above process.

    And that's all. Pretty easy. If you do not have the two tables that you need to use your validation that you need to load before loading the CSV file you need valid.

    Hope this can help you

  • Performance issues and options to reduce the loading with the Oracle text implementation

    Hi Experts,

    My database on Oracle 11.2.0.2 on Linux. We have Oracle implemented for the fuzzy search. Our oracle text indexes are defined as sync on commit that we cannot afford to have stale data.  Now our application done literally thousands of inserts/modifications/deletions of these columns where we have these Oracle text index defined. Thus, we see a significant impact on performance because the oracle text synchronization routines is called on each commit. We do nightly index optimization (optimization full every night at 3:00).  The text index oracle internal operations are appearing at the top of the sql page in our AWR report and fears it causes a lot of load on the DB.  Since we do optimization of the complete index once during the night, I think I should change that, and if I do, he's going to help us?

    For example, here are some data of AWR report my one day:

    Time elapsed (s) Executions Time by Exec (s) % Total % CPU %IO SQL ID SQL module SQL text
    27,386.25305 4410.0916.5015.829.98ddr8uck5s5kp3Start ctxsys.drvdml.com_sync_i...
    14,618.81213 9800.078.818.3927.7902yb6k216ntqfbegin ctxsys.syncrn (: idxownid,...)


    More top sql full text:

    ddr8uck5s5kp3begin ctxsys.drvdml.com_sync_index (: idxname,: idxmem,: partname);
    end
    02yb6k216ntqf

    begin ctxsys.syncrn (: idxownid,: idxoname,: idxid,: ixpid,: rtabnm,: flg); end;

    Now if I do optimization of the complete index that more often, and not only once night 15:00 will be this average, the load on DB sync on commit will decrease? If Yes, how many times should I optimized and the optimization itself does not lead to a load? Can anyone suggest?

    Thank you

    OrauserN

    It's to you which values you want to experiment.  Since 1 G, which is the same as 1024M is the maximum I could try that assigning to an index and see what effect it has.  You can use the same AWR report that you used previously and compare performance.  To determine when paging depends on your operating system and what tools you have.  Another option might be to use TRANSACTIONAL, that allows searching for unsynchronized lines and allow you to synchronize every five minutes, like Herald suggested, without any latency problem.  You can read about it here (scroll down to transaction):

    http://docs.Oracle.com/CD/E11882_01/text.112/e24436/csql.htm#CCREF23731

Maybe you are looking for