Oracle 11.2 - Perform parallel DML on a non partitioned table with LOB column

Hi,
Since I wanted to demonstrate new Oracle 12c enhancements on SecureFiles, I tried to use PDML statements on a non partitioned table with LOB column, in both Oracle 11g and Oracle 12c releases. The Oracle 11.2 SecureFiles and Large Objects Developer's Guide of January 2013 clearly says:
Parallel execution of the following DML operations on tables with LOB columns is supported. These operations run in parallel execution mode only when performed on a partitioned table. DML statements on non-partitioned tables with LOB columns continue to execute in serial execution mode.
INSERT AS SELECT
CREATE TABLE AS SELECT
DELETE
UPDATE
MERGE (conditional UPDATE and INSERT)
Multi-table INSERT
So I created and populated a simple table with a BLOB column:
SQL> CREATE TABLE T1 (A BLOB);
Table created.
Then, I tried to see the execution plan of a parallel DELETE:
SQL> EXPLAIN PLAN FOR
  2  delete /*+parallel (t1,8) */ from t1;
Explained.
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 3718066193
| Id  | Operation             | Name     | Rows  | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
|   0 | DELETE STATEMENT      |          |  2048 |     2   (0)| 00:00:01 |        |      |            |
|   1 |  DELETE               | T1       |       |            |          |        |      |            |
|   2 |   PX COORDINATOR      |          |       |            |          |        |      |            |
|   3 |    PX SEND QC (RANDOM)| :TQ10000 |  2048 |     2   (0)| 00:00:01 |  Q1,00 | P->S | QC (RAND)  |
|   4 |     PX BLOCK ITERATOR |          |  2048 |     2   (0)| 00:00:01 |  Q1,00 | PCWC |            |
|   5 |      TABLE ACCESS FULL| T1       |  2048 |     2   (0)| 00:00:01 |  Q1,00 | PCWP |            |
PLAN_TABLE_OUTPUT
Note
   - dynamic sampling used for this statement (level=2)
And I finished by executing the statement.
SQL> commit;
Commit complete.
SQL> alter session enable parallel dml;
Session altered.
SQL> delete /*+parallel (t1,8) */ from t1;
2048 rows deleted.
As we can see, the statement has been run as parallel:
SQL> select * from v$pq_sesstat;
STATISTIC                      LAST_QUERY SESSION_TOTAL
Queries Parallelized                    1             1
DML Parallelized                        0             0
DDL Parallelized                        0             0
DFO Trees                               1             1
Server Threads                          5             0
Allocation Height                       5             0
Allocation Width                        1             0
Local Msgs Sent                        55            55
Distr Msgs Sent                         0             0
Local Msgs Recv'd                      55            55
Distr Msgs Recv'd                       0             0
11 rows selected.
Is it normal ? It is not supposed to be supported on Oracle 11g with non-partitioned table containing LOB column....
Thank you for your help.
Michael

Yes I did it. I tried with force parallel dml, and that is the results on my 12c DB, with the non partitionned and SecureFiles LOB column.
SQL> explain plan for delete from t1;
Explained.
| Id  | Operation             | Name     | Rows  | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
|   0 | DELETE STATEMENT      |          |     4 |     2   (0)| 00:00:01 |        |      |            |
|   1 |  DELETE               | T1       |       |            |          |        |      |            |
|   2 |   PX COORDINATOR      |          |       |            |          |        |      |            |
|   3 |    PX SEND QC (RANDOM)| :TQ10000 |     4 |     2   (0)| 00:00:01 |  Q1,00 | P->S | QC (RAND)  |
|   4 |     PX BLOCK ITERATOR |          |     4 |     2   (0)| 00:00:01 |  Q1,00 | PCWC |            |
|   5 |      TABLE ACCESS FULL| T1       |     4 |     2   (0)| 00:00:01 |  Q1,00 | PCWP |            |
The DELETE is not performed in Parallel.
I tried with another statement :
SQL> explain plan for
2        insert into t1 select * from t1;
Here are the results:
11g
| Id  | Operation                | Name     | Rows  | Bytes | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
|   0 | INSERT STATEMENT         |          |     4 |  8008 |     2   (0)| 00:00:01 |        |      |            |
|   1 |  LOAD TABLE CONVENTIONAL | T1       |       |       |            |          |        |      |            |
|   2 |   PX COORDINATOR         |          |       |       |            |          |        |      |            |
|   3 |    PX SEND QC (RANDOM)   | :TQ10000 |     4 |  8008 |     2   (0)| 00:00:01 |  Q1,00 | P->S | QC (RAND)  |
|   4 |     PX BLOCK ITERATOR    |          |     4 |  8008 |     2   (0)| 00:00:01 |  Q1,00 | PCWC |            |
|   5 |      TABLE ACCESS FULL   | T1       |     4 |  8008 |     2   (0)| 00:00:01 |  Q1,00 | PCWP |            |
12c
| Id  | Operation                          | Name     | Rows  | Bytes | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
|   0 | INSERT STATEMENT                   |          |     4 |  8008 |     2   (0)| 00:00:01 |        |      |            |
|   1 |  PX COORDINATOR                    |          |       |       |            |          |        |      |            |
|   2 |   PX SEND QC (RANDOM)              | :TQ10000 |     4 |  8008 |     2   (0)| 00:00:01 |  Q1,00 | P->S | QC (RAND)  |
|   3 |    LOAD AS SELECT                  | T1       |       |       |            |          |  Q1,00 | PCWP |            |
|   4 |     OPTIMIZER STATISTICS GATHERING |          |     4 |  8008 |     2   (0)| 00:00:01 |  Q1,00 | PCWP |            |
|   5 |      PX BLOCK ITERATOR             |          |     4 |  8008 |     2   (0)| 00:00:01 |  Q1,00 | PCWC |            |
It seems that the DELETE statement has problems but not the INSERT AS SELECT !

Similar Messages

  • Cannot alter partitioned table with spatial column in Oracle 11.2.0.2.0

    Hello,
    I possibly discovered a bug in Oracle 11.2.0.2.0
    This script works fine with Oracle *11.2.0.1.0*:
    create table GEO_TABLE (
    ID NUMBER(19) not null,
    PART_NAME VARCHAR2(50) not null,
    GEO_POS MDSYS.SDO_GEOMETRY,
    constraint PK_GEO_TABLE primary key (ID)
    SEGMENT CREATION IMMEDIATE partition by list ( PART_NAME ) (partition P_DEFAULT values (DEFAULT)) enable row movement;
    ALTER TABLE GEO_TABLE ADD (COLUMN2 NUMBER(8) DEFAULT 0 NOT NULL);
    With Oracle *11.2.0.2.0* (on SLES 11, 64bit) i will get this error message on the alter table statement:
    SQL-Fehler: ORA-00600: Interner Fehlercode, Argumente: [kkpoffoc], [], [], [], [], [], [], [], [], [], [], []
    00600. 00000 - "internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s]"
    *Cause:    This is the generic internal error number for Oracle program
    exceptions.     This indicates that a process has encountered an
    exceptional condition.
    *Action:   Report as a bug - the first argument is the internal error number
    Can anyone reproduce this behaviour?
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE     11.2.0.2.0     Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    Edited by: user7425061 on 19.11.2010 12:04

    Metalink does not have any references for this error - please raise SR with Oracle support.

  • Performance between two partitionned tables with different structure

    Hi,
    I would like if there is a difference between two partitionned tables with different structure in term of performance (access, query, insertions, updates ).
    I explain myself in detail :
    I have a table that stores one value every 10 minutes in a day (so we have 144 values (24*6) in the whole day), with the corresponding id.
    Here is the structure :
    | Table T1 |
    + id PK |
    + date PK |
    + sample1 |
    + sample2 |
    + ... |
    + sample144 |
    The table is partionned on the column date, with a partionned every months. The primary key is based on the columns (id, date).
    There is an additionnal index on the column (id) (is it useful ?).
    I would like to know if it is better to have a table with just (id, date, value) , so for one row in the first table we'll have 144 rows in the future? table. The partition will already be on the columns (id, date) with the index associated.
    What are the gains or loss in performance with this new structure ( access, DMLs , storage ) ?
    I discuss with the Java developers and they say it is simpler to manage in their code.
    Oracle version : Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    Thanks & Regards
    From France
    Oliver
    Edited by: 998239 on 5 avr. 2013 01:59

    I mean storage in tablespaces and datafiles on disk.
    Can you justify please and give me concrete arguments why the two structures are equivalent ( except inserting data in T(id, date,value))
    because i have to make a report.i didnt say any thing like
    two structures are equivalent ( except inserting data in T(id, date,value)i said
    About structure : TABLE1(id, date, value) is better than TABLE1(id, date, sample1, .... sample144)because
    1) oracle has restriction for numbers of column. Ok you can have 144 columns now but for future if you must have more than 1000 columns , what will you do?
    2) Restrictions on Table Compression (Table compression is not supported for tables with more than 255 columns.)
    3) store same type values on diffrent columns is bad practise
    http://docs.oracle.com/cd/B28359_01/server.111/b28318/schema.htm#i4383
    i remember i seen Toms article about this but now i cant find it sorry ((( if i found i will post here

  • 11.2.0.3 Parallel delete on non-partitioned table

    Friends and mentors...
    I want to know more about parallel deleted and it's requirements...I have gone through Oracle manuals and articles but not able to understand exactly about parallel delete (dml) feature...
    Task: Trying to delete large data (20 mil rows out of 60 mil) from non-partitioned table
    Job frequency: Once every month
    Oracle: 11.2.0.3
    OS: Linux
    Questions:
    1. Any idea on best approach?
    2. Do I need to have table partitioned to use /*+parallel */ hint?
    3. If I use /*+parallel*/ hint in delete statement then do I need to use "alter session enable parallel dm1" ?
    4. How to decided degree of parallelism (DOP)? is it good to use auto for DOP?
    Currently I am planning to use parallel hint in delete statement, is this enough or need better plan?
    thanks..

    khallas301 wrote:
    Friends and mentors...
    I want to know more about parallel deleted and it's requirements...I have gone through Oracle manuals and articles but not able to understand exactly about parallel delete (dml) feature...
    Task: Trying to delete large data (20 mil rows out of 60 mil) from non-partitioned table
    Job frequency: Once every month
    Oracle: 11.2.0.3
    OS: Linux
    Questions:
    1. Any idea on best approach?
    2. Do I need to have table partitioned to use /*+parallel */ hint?
    3. If I use /*+parallel*/ hint in delete statement then do I need to use "alter session enable parallel dm1" ?
    4. How to decided degree of parallelism (DOP)? is it good to use auto for DOP?
    Currently I am planning to use parallel hint in delete statement, is this enough or need better plan?
    thanks..
    It appears that you believe that parallel is always faster than non-parallel; which is not true in every case.
    The slowest part of any DELETE is the physical I/O.
    How many parallel processes accessing the same table before the disk gets saturated?

  • How to find out the Non Partitioned Tables used 2Gb on oracle

    Hi team
    how to find out the Non Partitioned Tables used > 2Gb on oracle where not is sys & system
    regards

    heres 1 I made earlier
    set pagesize 999
    set linesize 132
    col owner format a25
    col segment_name format a60
    select owner,segment_name,segment_type,(bytes/1024/1024)"MB size"
    from dba_segments
    where owner not in ('SYS','SYSTEM','XDB','MDSYS','SYSMAN') -- edit for taste
    and segment_type = 'TABLE'
    having (bytes/1024/1024) > 2000
    group by bytes, segment_Type, segment_name, owner
    order by 4 asc

  • Performance of large tables with ADT columns

    Hello,
    We are planning to build a large table ( 1 billion+ rows) with one of the columns being an Advanced Data Type (ADT) column. The ADT column will be based on a TYPE that will have approximately (250 attributes).
    We are using Oracle 10g R2
    Can you please tell me the following:
    1. How will Oracle store the data in the ADT column?
    2. Will the entire ADT record fit in one block?
    3. Is it still possible to partition a table on an attribute that is part of the ADT?
    4. How will the performace be affected if Oracle does a full table scan of such a table?
    5. How much space will Oracle take, if any, for storing a NULL in an ADT?
    I think we can create indexes on the attribute of the ADT column. Please let me know if this is not true.
    Thanks for your help.

    I agree with D.Morgan that object type with 250 attributes is doubtful.
    I don't like object tables (tables with "row objects") too.
    But, your table is a relational table with object column ("column object").
    C.J.Date in An introduction to Database Systems (2004, page 885) says:
    "... object/relational systems ... are, or should be, basically just relational systems
    that support the relational domain concept (i.e., types) properly - in other words, true relational systems,
    meaning in particular systems that allow users to define their own types."
    1. How will Oracle store the data in the ADT column?...
    For some answers see:
    “OR(DBMS) or R(DBMS), That is the Question”
    http://www.quest-pipelines.com/pipelines/plsql/tips.htm#OCTOBER
    and (of course):
    "Oracle® Database Application Developer's Guide - Object-Relational Features" 10g Release 2 (10.2)
    http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14260/adobjadv.htm#i1006903
    Regards,
    Zlatko

  • Will Materialized view log reduces the performance of DML statements on the master table

    Hi all,
    I need to refresh a on demand fast refresh Materialized view in Oracle 11GR2. For this purpose I created a Materialized view log on the table (Non partitioned) in which records will be inserted @ rate of 5000/day as follows.
    CREATE MATERIALIZED VIEW LOG ON NOTES NOLOGGING WITH PRIMARY KEY INCLUDING NEW VALUES;
    This table already has 20L records and adding this Mview log will reduce the DML performance on the table ?
    Please guide me on this.

    Having the base table maintain a materialised view log will have an impact on the speed of DML statements - they are doing extra work, which will take extra time. A more sensible question would be to ask whether it will have a significant impact, to which the answer is almost certainly "no".
    5000 records inserted a day is nothing. Adding a view log to the heap really shouldn't cause any trouble at all - but ultimately only your own testing can establish that.

  • Performance issue when inserting into spatial indexed table with JDBC

    We have a table named 'feature' which has a "sdo_geometry" column, and we created spatial index on that column,
    CREATE TABLE feature ( id number, desc varchar, oshape sdo_gemotry)
    CREATE INDEX feature_sp_idx ON feature(oshape) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    Then we executed the following SQL to insert about 800 records into that table(We tried this by using DB visualizer and
    our Java application, both of them were using JDBC driver to connect to the oracle 11gR2 database) .
    insert into feature(id,desc,oshape) values (1001,xxx,xxxxx);
    insert into feature (id,desc,oshape) values (1002,xxx,xxxxx);
    insert into feature (id,desc,oshape) values (1800,xxx,xxxxx);
    We encoutered the same problem as this topic
    Performance of insert with spatial index
    It takes nearly 1 secs for inserting one record,compare to 50 records inserted per sec without spatial index,
    which is 50x drop in peformance when doing insertion with spatial index.
    However, when we copy and paste those insertion scripts into Oracle Client(same test and same table with spatial index), we got a totally different performance result:
    more than 50 records inserted in 1 secs, just as fast as the insertion without building spatial index.
    Is it because Oracle Client is not using JDBC? Perhaps JDBC was got something wrong when updating those spatial indexed tables.
    Edited by: 860605 on 19/09/2011 18:57
    Edited by: 860605 on 19/09/2011 18:58
    Edited by: 860605 on 19/09/2011 19:00

    Normally JDBC use auto-commit. So each insert can causes a commit.
    I don't know about Oracle Client. In sqlplus, insert is just a insert,
    and you execute "commit" to explicitly commit your changes.
    So maybe this is the reason.

  • Uploading a file (.doc, .xls, .txt) into an Oracle table with BLOB column

    Hello All :
    I have been trying to figure out for a simple code I can use in my JSP to upload a file (of any format) into an Oracle table with a BLOB column type. I have gone through a lot of existing forums but couldnot find a simple code (that doesnot use Servlet, for eg.) to implement this piece.
    Thanks a lot for your help !!

    Hi.
    First of all to put a file into Oracle you need to get the array of bytes byte[] for that file. For this use for example FileInputStream.
    After you get the byte array try to use this code:
            try {
                Connection conn = myGetDBConnection();
                PreparedStatement pstmt = conn.prepareStatement("INSERT INTO table1 (content) VALUES(?)");
                byte[] content = myGetFileAsBytes();
                if (content != null) {
                    pstmt.setBinaryStream(0, new ByteArrayInputStream(content), content.length);
                pstmt.close();
                conn.close();
            } catch (Exception ex) {
                ex.printStackTrace();
            }or instead of using ByteArrayInputStream try pstmt.setBinaryStream(0, new FileInputStream(yourFile), getFileSize());Hope this will help...
    regards, Victor Letunovsky

  • How to migrate data fSQL server 2005 Tables with image column To ORACLE 11g

    Hi ....
    I am in the middle of migrating our database from sqlserver 2005 version to ORACLE 11g instance, and i'm facing a problem when trying to load data into one of the oracle table which has blob column and some more. The data file was extracted from sql server 2005 table which has image column and some more. All other columns are sinking with the migration as expected but the image column is not getting loaded into oralce blob.
    I tried loading data using sqlloader.
    Is there any other way to migrate data directly between these two versions of database?. Pls help...
    Edited by: user13310523 on 21-Jun-2010 23:48

    Welcome to the forum,
    Hi,
    To link Oracle with SQL Server follow this steps:
    1-Install Oracle ODBC drivers on the server (your local Oracle database) that will access the remote SQL Server database using the database link.
    2. Setup the ODBC connection on the local Oracle database using the Windows ODBC Data Source Administrator
    3. Test the ODBC drivers to ensure that connectivity is made to the SQL Server database.
    4. Ensure that your global_names parameter is set to False.
    5. Configure the Oracle Heterogeneous services by creating an initodbc.ora file within the Oracle database.
    7. Modify the Listener.ora file.
    SID_NAME is the DSN for the remote database.
    ORACLE_HOME is the actual Oracle home file path.
    PROGRAM tells Oracle to use heterogeneous services.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME=Cas30C) -- Enter the DSN on this line
    (ORACLE_HOME = c:\oracle10gdb) -- Enter your Oracle home on this line
    (PROGRAM = hsodbc) ) )
    8. Modify the Tnsnames.ora file. This is the Oracle database installation accessed by the users to connect to the ODBC drivers
    (DESCRIPTION=
    (ADDRESS_LIST=
    (Address=(PROTOCOL=TCP)
    (HOST=
    -- (Server x)
    (PORT=1521))) -- Enter the port on which the server x Oracle installation
    -- is listening
    (CONNECT_DATA=(SID=Cas30c)) - Enter the DSN name
    (HS=OK) -- Enter this value. It tells Oracle to use hetergeneous services
    9. Reload the listener on local Oracle database
    10. Create a database link on the local Oracle installation that accesses the heterogeneous connection, which, in turn, connect to SQL Server.
    11. Run a SQL Server Select statement from the Oracle installation using the database link
    Thanks
    BelMan :)

  • ORA-03237 when creating table with BLOB columns on Oracle 9i

    I am playing with my new Oracle 9i database. I am trying to copy
    tables from my 8.1.6 db. Three tables won't create due to this
    new message. The 9i documentation says it's soemthing to do with
    freelist groups but my DBA says he hasn't set up any.
    The tablespace is one of these newfangled locally managed
    tablespaces (predetermined size 8k).
    I can create these tables if I change the BLOB column to datatype
    VARCHAR2(4000).
    I have raised this through the usual channels, but I thought I'd
    try this site as well.
    Cheers, APC

    victor_shostak wrote:
    Figured, Virtual Columns work only for Binary XML.They are only supported, currently, for Binary XML.

  • Performing a specific calculation in a pivot table with BI Publisher 10g

    I am using BI Publisher 10g and new on it and I need to integrate a specific calculation measure in a pivot table
    The logic uses two measures that already exist in the report (Demand & PAB) and the required calculation is represented by a new measure/row (Calculated). The pivot time is in weeks
    Week w0     w1     w2     w3     w4     w5 .....
    Demand     d(w0)     d(w1)     d(w2)     d(w3)     d(w4)     d(w5) .....
    PAB     p(w0)     p(w1)     p(w2)     p(w3)     p(w4)     p(w5) .....
    Calculated     c(w0)     c(w1)     ....     ....     ....     c(w5) .....
    If p(w0) < d(w1) --> then c(w0) = p(w0) / d(w1)
    If not
    If p(w0) < d(w1) + d(w2) --> then c(w0) = p(w0) / ( d(w1) + d(w2) ) * 2
    If not
    If p(w0) < d(w1) + d(w2) + d(w3) --> then c(w0) = p(w0) / ( (dw1) + d(w2) + d(w3 ) ) * 3
    If not
    etc .... Same logics apply for c(w1) and so on
    Is such calculation logic achievable in Bi Publisher ? If yes, how would you do it ?
    Thanks for your time and support on this
    Regards, Samir
    Edited by: skaroui on 02-Mar-2012 05:50
    Edited by: skaroui on 02-Mar-2012 06:02
    Edited by: skaroui on 02-Mar-2012 06:12

    Can you use the logic that you specified in the data model (query) to generate the required data and then use it in the pivot table? That would be the easiest way to do it. Tweaking the code to include the conditional logic/calculated measures is not going to be straightforward..
    Thanks,
    Bipuser

  • How To Perform Parallel UPDATE When Trigger is ENABLE On Table.

    select *from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE    11.1.0.7.0      Production
    TNS for Linux: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - ProductionIs there any way to perform PARALLEL UPATE on a table which has a trigger?
    One of my ETL performs a large UPDATE (14 Million update) everyday on a production hot table. Eventhough PDML is enable at session level (also TABLE.DEGREE=8), Oracle is doing serialized UPDATE.
    As per Oracle documents, it is documented behavior.
    Here is my Execution plan when i put the trigger ENABLE
    | Id  | Operation              | Name                | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |    TQ  |IN-OUT| PQ Distrib |
    |   0 | UPDATE STATEMENT       |                     |       |       |  6443 (100)|          |       |       |        |      |            |
    |   1 |  UPDATE                | ACCOUNT             |       |       |            |          |       |       |        |      |            |
    |*  2 |   PX COORDINATOR       |                     |       |       |            |          |       |       |        |      |            |
    |   3 |    PX SEND QC (RANDOM) | :TQ10000            | 72487 |  3610K|  6443   (3)| 00:01:18 |       |       |  Q1,00 | P->S | QC (RAND)  |
    |*  4 |     FILTER             |                     |       |       |            |          |       |       |  Q1,00 | PCWC |            |
    |   5 |      PX BLOCK ITERATOR |                     | 72487 |  3610K|  6443   (3)| 00:01:18 |   KEY |   KEY |  Q1,00 | PCWC |            |
    |*  6 |       TABLE ACCESS FULL| ACCOUNT             | 72487 |  3610K|  6443   (3)| 00:01:18 |   KEY |   KEY |  Q1,00 | PCWP |            |
    Predicate Information (identified by operation id):
         8 - filter("SET_OF_BOOKS"='1' AND "GL_BATCH_ID">(-10) AND ("JOURNAL_ENTRY_TYPE_ID"<2400 OR
                  "JOURNAL_ENTRY_TYPE_ID">=3000) AND "ACCOUNTING_DATE">=TO_DATE(' 2010-08-11 00:00:00', 'syyyy-mm-dd
                  hh24:mi:ss') AND "ACCOUNTING_DATE"<TO_DATE(' 2010-08-12 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))When i disable trigger
    | Id  | Operation                | Name     | Rows  | Bytes | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
    |   0 | UPDATE STATEMENT         |          |   726 | 27588 | 11899   (2)| 00:02:23 |        |      |            |
    |   1 |  PX COORDINATOR          |          |       |       |            |          |        |      |            |
    |   2 |   PX SEND QC (RANDOM)    | :TQ10001 |   726 | 27588 | 11899   (2)| 00:02:23 |  Q1,01 | P->S | QC (RAND)  |
    |   3 |    INDEX MAINTENANCE     | ACCOUNT  |       |       |            |          |  Q1,01 | PCWP |            |
    |   4 |     PX RECEIVE           |          |   726 | 27588 | 11899   (2)| 00:02:23 |  Q1,01 | PCWP |            |
    |   5 |      PX SEND RANGE       | :TQ10000 |   726 | 27588 | 11899   (2)| 00:02:23 |  Q1,00 | P->P | RANGE      |
    |   6 |       UPDATE             | ACCOUNT  |       |       |            |          |  Q1,00 | PCWP |            |
    |   7 |        PX BLOCK ITERATOR |          |   726 | 27588 | 11899   (2)| 00:02:23 |  Q1,00 | PCWC |            |
    |*  8 |         TABLE ACCESS FULL| ACCOUNT  |   726 | 27588 | 11899   (2)| 00:02:23 |  Q1,00 | PCWP |            |
    Predicate Information (identified by operation id):
       8 - filter("SET_OF_BOOKS"='1' AND "GL_BATCH_ID">(-10) AND ("JOURNAL_ENTRY_TYPE_ID"<2400 OR
                  "JOURNAL_ENTRY_TYPE_ID">=3000) AND "ACCOUNTING_DATE">=TO_DATE(' 2010-08-11 00:00:00', 'syyyy-mm-dd
                  hh24:mi:ss') AND "ACCOUNTING_DATE"<TO_DATE(' 2010-08-12 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))I cannot disable trigger due to some business reasons.
    Is there any way to speed up UPDATE ?

    No, you cannot perform parallel dml with a trigger present.
    If you are updating the bulk of the rows and can take an outage, you can
    disable the trigger, perform the update, enable the trigger
    OR
    copy to another table, performing the update in the select, rename the tables and add the trigger on the new table
    Hemant K Chitale

  • Import is very Slow with xmltype column in oracle 9.2.0.7

    Hi
    We are using oracle 9.2.0.7 on Solaris
    The import without XMLTYPE column is faster the import of the table with XMLTYPE column.Also when we do the export in direct path it is still going for Conventional(I suppose this is correct for XMLTYPE).
    Is this the general behaviour of XMLTYPE...if so how to improve the performance of the import.
    Can anybody help us out in resolving the issue.

    here is the output
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    CREATE TABLE "MMSCBMC"."PAYMENTS_AUDIT"
    ( "PMTID" NUMBER NOT NULL ENABLE,
    "PMTSTATUS" VARCHAR2(32) NOT NULL ENABLE,
    "PMTSTATUS_CODE" VARCHAR2(10) NOT NULL ENABLE,
    "CSREFID" VARCHAR2(32),
    "CURAMT" NUMBER(15,2) NOT NULL ENABLE,
    "CUSTOMER_KEY" NUMBER NOT NULL ENABLE,
    "ACCTID" VARCHAR2(32) NOT NULL ENABLE,
    "BANKREFID" VARCHAR2(34) NOT NULL ENABLE,
    "PAYEEID" NUMBER,
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    "PAYMENTS_AUDIT_KEY" NUMBER NOT NULL ENABLE,
    "PROCDATE" DATE NOT NULL ENABLE,
    "DUEDATE" DATE NOT NULL ENABLE,
    "IMMEDIATE_GENERATION" NUMBER DEFAULT 0 NOT NULL ENABLE,
    "RECURRINGPMTID" NUMBER,
    "BATCHID" NUMBER,
    "REMIT_INFO" VARCHAR2(200),
    "BILLING_ACCT" VARCHAR2(32),
    "PAYMENT_METHOD" VARCHAR2(20) NOT NULL ENABLE,
    "IS_ACCTNUMBER" NUMBER,
    "SPREFID" VARCHAR2(36),
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    "FIDEBITTRCNUM" VARCHAR2(32),
    "FEE" NUMBER(12,2),
    "FEE_TYPE" VARCHAR2(10) DEFAULT NULL ,
    "DATE_ADDED" DATE NOT NULL ENABLE,
    "CLIENTIP" VARCHAR2(32) NOT NULL ENABLE,
    "LAST_UPDATED" DATE NOT NULL ENABLE,
    "ACTION" VARCHAR2(32),
    "MODIFIEDBY" VARCHAR2(32) NOT NULL ENABLE,
    "ISCSR" VARCHAR2(1) NOT NULL ENABLE,
    "SUBUSER_KEY" NUMBER,
    "TOKEN" NUMBER DEFAULT 0 NOT NULL ENABLE,
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    "FUNDINGSTATUS_CODE" NUMBER DEFAULT 0 NOT NULL ENABLE,
    "FUNDINGSTATUS" VARCHAR2(32) DEFAULT 'Funds Pending' NOT NULL ENABLE,
    "PRODUCT_CODE" VARCHAR2(10),
    "SUB_PRODUCT_CODE" VARCHAR2(10),
    "ACCT_TYPE" VARCHAR2(3),
    "DEST_PRODUCT_CODE" VARCHAR2(10),
    "DEST_SUB_PRODUCT_CODE" VARCHAR2(10),
    "DEST_BANKREFID" VARCHAR2(34),
    "DEST_ACCT_TYPE" VARCHAR2(3),
    "ISDEBIT" NUMBER NOT NULL ENABLE,
    "PAYMENTFROM_NICKNAME" VARCHAR2(96),
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    "PAYMENTFROM_ACCTID" VARCHAR2(32),
    "PAYMENTTO_NICKNAME" VARCHAR2(96),
    "PAYMENTTO_ACCTID" VARCHAR2(32),
    "DEST_ISBUSINESSACCT" NUMBER,
    "APPROVE_DATE" DATE,
    "APPROVE_KEY" NUMBER,
    "LAST_MODIFIER_KEY" NUMBER,
    "CHECK_DESC" VARCHAR2(200),
    "FAILURE_REASON" VARCHAR2(250),
    "PMTFUNDRETRY_COUNT" NUMBER DEFAULT 0 ,
    "MQ_TRANSACTIONID" NUMBER,
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    "FREQUENCY" NUMBER,
    "NUMBEROFREMPAYMENTS" NUMBER,
    "OPENENDED" NUMBER,
    "ORIGINATOR_KEY" NUMBER NOT NULL ENABLE,
    "EXTERNALREFERENCE" "SYS"."XMLTYPE" ,
    "EXTERNALINFO" "SYS"."XMLTYPE" ,
    "PRINCIPAL_AMT" NUMBER(15,2),
    "ESCROW_AMT" NUMBER(15,2),
    "LATEFEE_AMT" NUMBER(15,2),
    "OTHERFEE_AMT" NUMBER(15,2),
    "REGULARPMT_AMT" NUMBER(15,2),
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    CONSTRAINT "PK_PAYMENTSADT_KEY" PRIMARY KEY ("LAST_UPDATED", "PAYMENTS_AUDIT_K
    EY")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "MMS_DATA_TBS" ENABLE,
    CONSTRAINT "FK01_PAYMENTS_AUDIT" FOREIGN KEY ("APPROVE_KEY")
    REFERENCES "MMSCBMC"."CUSTOMER" ("CUSTOMER_KEY") ENABLE,
    CONSTRAINT "FK02_PAYMENTS_AUDIT" FOREIGN KEY ("LAST_MODIFIER_KEY")
    REFERENCES "MMSCBMC"."CUSTOMER" ("CUSTOMER_KEY") ENABLE,
    CONSTRAINT "FK06_PAYMENTS_AUDIT" FOREIGN KEY ("ORIGINATOR_KEY")
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    REFERENCES "MMSCBMC"."ORIGINATOR" ("ORIGINATOR_KEY") ENABLE
    ) PCTFREE 2 PCTUSED 40 INITRANS 1 MAXTRANS 255 LOGGING
    STORAGE(
    BUFFER_POOL DEFAULT)
    TABLESPACE "PAYMENTS_AUDIT_DATA_TBS"
    PARTITION BY RANGE ("LAST_UPDATED")
    (PARTITION "M1_2005" VALUES LESS THAN (TO_DATE(' 2005-02-01 00:00:00', 'SYYYY-
    MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    PCTFREE 2 PCTUSED 40 INITRANS 1 MAXTRANS 255
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    TABLESPACE "PAYMENTS_AUDIT_DATA_TBS"
    LOB ("SYS_NC00059$") STORE AS (
    TABLESPACE "PAYMENTS_AUDIT_DATA_TBS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSI
    ON 10
    NOCACHE
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))
    LOB ("SYS_NC00061$") STORE AS (
    TABLESPACE "PAYMENTS_AUDIT_DATA_TBS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSI
    ON 10
    NOCACHE
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)) NOCOMPRESS ,
    PARTITION "M2_2005" VALUES LESS THAN (TO_DATE(' 2005-03-01 00:00:00', 'SYYYY-M
    M-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    PCTFREE 2 PCTUSED 40 INITRANS 1 MAXTRANS 255
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "PAYMENTS_AUDIT_DATA_TBS"
    LOB ("SYS_NC00059$") STORE AS (
    TABLESPACE "PAYMENTS_AUDIT_DATA_TBS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSI
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    ON 10
    NOCACHE
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))
    LOB ("SYS_NC00061$") STORE AS (
    TABLESPACE "PAYMENTS_AUDIT_DATA_TBS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSI
    ON 10
    NOCACHE
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)) NOCOMPRESS ,
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    PARTITION "MAX_VALUE" VALUES LESS THAN (MAXVALUE)
    PCTFREE 2 PCTUSED 40 INITRANS 1 MAXTRANS 255
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "PAYMENTS_AUDIT_DATA_TBS"
    LOB ("SYS_NC00059$") STORE AS (
    TABLESPACE "PAYMENTS_AUDIT_DATA_TBS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSI
    ON 10
    NOCACHE
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    LOB ("SYS_NC00061$") STORE AS (
    TABLESPACE "PAYMENTS_AUDIT_DATA_TBS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSI
    ON 10
    NOCACHE
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)) NOCOMPRESS )

  • Deadlock issue in Oracle 10g Partitioned Tables

    Hi ALL,
    I am facing an issue of Deadlock while inserting data into a partitioned table.
    I get an error "ORA-00600: Deadlock detected". when i see the trace files, following lines are appearing in them:
    "Single resource deadlock: blocking enqueue which blocks itself".
    Here is the detail of my test case:
    1. I have a list-partitioned table, with partitioning defined on some business codes.
    2. I have a query that merges data into partitioned table (actually compares unique keys between temporary table and partitioned table and then issue an insert if keys not matched, no update part).
    3. The temporary table contains transactional data against many business codes.
    3. when calling the above query from multiple (PL/SQL) sessions, i observe that when we merge data in same partition (from different sessions) than deadlock issue occurs, otherwise it is OK.
    4. Note that all sessions are executed at same time. Also note that Commit is called after each session is completed. Each session contains 2-3 more queries after the mentioned merge statement.
    Is there an issue with oracle merge/insert on same partition (from different sessions)? What is the locking mechanism for this particular case (partitioned tables)?
    My oracle version is Oracle 10g (10.2.0.4). Kindly advice.
    Thanks,
    QQ.

    Could you print the deadlock tree so we can see the type and mode of the locking. (Please use the 'code' tags - see FAQ at top right of screen - to showthe output in fixed font). can you list any SQL operated by this session that gets reported in the trace file.
    Does the table reference itself in a foreign key.
    Is this table involved in any referential integrity constraints.
    Do you have a global primary key index, or a local primary key index ?
    Are there any triggers on the table - if so do they contain autonomous transactions.
    At present the only though that springs to mind is that the merge command has to lock the target table to do the insert/update, but it also has to lock any child table. The mode of the child lock depends on whether it has a suitable index or not, and whether the child table IS also the parent table. If you have two merges to the same partition one partition may get its locks, and the other partition may be in a state where it can't get one of the locks because it's wait for the other. (This shouldn't be a self-deadlock, though, but the scenario might be heading in the right direction for a self-deadlock).
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge." (Stephen Hawking)

Maybe you are looking for

  • MacPro Kernel Panic Frequently

    We have a Mac Pro at work that is used for professional video editing and this one workstation ahs been crashing quote often in recent weeks. The context behind this panic was that he was rendering a video in Final Cut Pro 7 and using safari. Here is

  • May i know how can i include a search filter box in Muse?

    Hi, i'm going to set up a website which contain a lot of list and I would like to include a search filter box where user get to filter their search result in the list that I inserted. Is there any good tutorials or pre-post that i can refer? Thank yo

  • Macbook White keyboard issue (potential software problem, please help!)

    Hi there! Before I go into detail I have a Late 2008 Macbook White (Upgraded to 4GB RAM, 320GB HDD) so I would have had it two years this Christmas (2010) Over the last few months, on odd occasions the bottom row of keys completely stop working (by b

  • DB level triggers to log transaction ...

    Hi friends, I have a ORACLE 10g DB. I want to track all the transactions made to the database. It can be either insert, Update, Delete or call for a procedure or function or package, or select statement. I want to log all the transaction to a text fi

  • HT2008 Ichat wont let me log in even when i create a new account

    It tells me i have incorrect username/password even though there not? Help?