Why this parallel DML statement is not run as fast as DBMS_PARALLEL_EXECUTE?

Hello

I'm on the database Oracle Enterprise Edition, Linux RH 11.2.0.3. I have a pl/sql function that accepts a sdo_geometry (essentially an object with a few varrays), round each number in one of the varrays and retransmits the object.  Here is a version of the function, simplified slightly for brevity:

create or replace round_coordinates (p_geometry in sdo_geometry, p_round_factor in numbers)

return sdo_geometry parallel_enable

is

sdo_geometry v_geometry: = p_geometry;

v_ordinates sdo_ordinate_array;

Start

v_ordinates: = p_geometry.sdo_ordinates;

for me in v_ordinates.first... loop of v_ordinates. Last

v_ordinates (i): = round (v_ordinates (i), p_round_factor);

end loop;

Return sdo_geometry (v_geometry.sdo_gtype, v_geometry.sdo_srid, v_geometry.sdo_point, v_geometry.sdo_elem_info, v_ordinates);

end round_coordinates;

/

I need to perform this function as an update DML on hundreds of millions of sdo_geometry objects and according to my estimates it will take weeks.  So, I want to run in parallel.

The data is in a bunch of tables, some with lines of k ~ 100 more with millions of people.  My preference is to browse the tables and run an update such as:

Update < table > set geometry = round_coordinates (geometry);

But I would like to operate in parallel, so I thought that I would allow the DML parallel to the session with

ALTER session enable parallel dml.

ALTER table < table > parallel;

, and then run the update by: Update / * + parallel * / < table > set geometry = round_coordinates (geometry);

When I do that, I can see a v$ px_session 16 parallel slaves are bent and the plan of the explanation is the following:

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

| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |    TQ | IN-OUT | PQ Distrib.

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

|   0 | UPDATE STATEMENT.             | 10000 |   468K |    43 (0) | 00:00:01 |        |      |            |

|   1.  UPDATE | SMALL_10000 |       |       |            |          |        |      |            |

|   2.   COORDINATOR OF PX |             |       |       |            |          |        |      |            |

|   3.    PX SEND QC (RANDOM). : TQ10000 | 10000 |   468K |    43 (0) | 00:00:01 |  Q1 00 | P > S | QC (RAND) |

|   4.     ITERATOR BLOCK PX |             | 10000 |   468K |    43 (0) | 00:00:01 |  Q1 00 | ISSUE |            |

|   5.      TABLE ACCESS FULL | SMALL_10000 | 10000 |   468K |    43 (0) | 00:00:01 |  Q1 00 | SVCP |            |

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

But the update statement on my test data set does not any more quickly - it takes a few seconds more series that suggests General fresh extra expectations for the management of parallel slaves that's happened, but they did not have the query run faster.


I tried to use the dbms_parallel_execute with the create_chunks_by_rowid option package and parallel_level = 16 With that I get at the end just over 1/16th of the time that it takes to run in series!

That's fine, so I have the option dbms_parallel_execute, but I would like to understand why the query with the parallel flag does not expedite things.

Any ideas?

Thank you

John

It may be that the call to the PL/SQL function slows down things. Did you think to do in pure SQL?

Here is an example:

update test_sdo tsd
   set tsd.geometry.sdo_ordinates =
       (select cast(collect(round(t2.column_value)) as sdo_ordinate_array)
          from test_sdo t1
              ,table(t1.geometry.sdo_ordinates) t2
         where t1.id = tsd.id)

Post edited by: PaulHorth

BTW: You can parallelize the query part of the SQL but not updating, it's documentation:

"Parallel DML can be done on tables with columns object provided that the columns of the object are not accessible."

Tags: Database

Similar Questions

  • Why the error message is created, and the statement may not run properly?

    Why the error message is created, and the statement may not run properly?
    SQL> select sql_handle, plan_name, creator from dba_sql_plan_baselines where 
    sql_text='select*from hr.jobs where min_salary>10000';
    select sql_handle,plan_name,creator from dba_sql_plan_baselines 
    where sql_text='select*from hr.jobs where min_salary>10000'
                                                                          *
    ERROR at line 1:
    ORA-00932: inconsistent datatypes: expected - got CLOB

    It is true that it is the problem of syntax. Change the increased as follows, the increased can run successfully:

    SQL> select sql_handle,plan_name,creator from dba_sql_plan_baselines where sql_text
    like 'select*from hr.jobs where min_salary>10000';
    

    Edited by: jetq may 3, 2010 19:26

  • When installing iTunes I get a message error "there is a problem with this Windows Installer package. A program required for this install to complete could not run. »

    Windows Installer package error

    When installing iTunes I get a message error "there is a problem with this Windows Installer package. A program required for this install to complete could not run. "I downloaded Windows Installer 4.5, rebooted and tried again with the same results.  How can I fix?

    Hello

    Important The Windows Installer Cleanup (MSICUU2.exe) utility that was previously referred to as in this article has been abandoned. Although the Windows Installer Cleanup utility solved a few problems installing, it sometimes damaged other components that have been installed on the computer. For this reason, the tool has been removed from the Microsoft Download Center. program install and uninstall problem solving

    (http://support.microsoft.com/mats/Program_Install_and_Uninstall)

    is a replacement for this utility.

    "The problems with programs that cannot be installed or uninstalled.

    http://support.Microsoft.com/mats/Program_Install_and_Uninstall

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    And see if this information helps you install iTunes:

    "Not to install iTunes or QuickTime for Windows"

    http://support.Apple.com/kb/HT1926

    «Remove and reinstall iTunes, QuickTime, and other software components for Windows Vista or Windows 7»

    http://support.Apple.com/kb/HT1923

    If the advice already given does not, please contact Apple for assistance.

    "iTunes support-how to use iTunes.

    http://www.Apple.com/support/iTunes/

    "Contact iTunes Support.

    http://www.Apple.com/support/iTunes/contact/

    Or ask in the community Apple iTunes:

    https://discussions.Apple.com/community/iTunes

    See you soon.

  • Select inside a select statement is not running

    Can you please explain to me why the bottom is not run and what we need to do to run this kind of scenario.

    My second REGEXP_LIKE variable comes from another table

    Select

    * de

    EMP

    WHERE

    NOT REGEXP_LIKE(ename, select 'LA| AR' from dual

    )

    Because online select statement needs to be surrounded by square brackets so that the result is regarded as a value.

    SQL > ed
    A written file afiedt.buf

    1 Select
    2 of PEM
    3 * WHERE NO REGEXP_LIKE (ename, (select ' THE |)) AR' double))
    SQL > /.

    EMPNO, ENAME, JOB HIREDATE DEPTNO COMM SAL MGR
    ---------- ---------- --------- ---------- -------------------- ---------- ---------- ----------
    7369 SMITH CLERK 7902 DECEMBER 17, 1980 00:00:00 800 20
    7499 ALLEN SALESMAN 7698 20 FEBRUARY 1981 00:00:00 1600 300 30
    7566 JONES MANAGER 7839 2 APRIL 1981 00:00:00 2975 20
    7788, SCOTT, ANALYST, 7566 19 APRIL 1987 00:00:00 3000 20
    PRESIDENT OF KING 7839 17 NOVEMBER 1981 00:00:00 5000-10
    7844 TURNER SALESMAN 7698 1981 - SEP - 08 00:00:00 1500 0 30
    7876 ADAMS CLERK 7788 23 MAY 1987 00:00:00 1100 20
    7900 JAMES CLERK 7698 3 DECEMBER 1981 00:00:00 950 30
    7902 FORD ANALYST 7566 3 DECEMBER 1981 00:00:00 3000 20
    7934 MILLER CLERK 7782 23 JANUARY 1982 00:00:00 1300 10

    10 selected lines.

    However, why not just make...

    Select *.

    WCP

    If NOT of REGEXP_LIKE (ename, ' THE |) AR')

    /

  • Hi friends this is the code for the dynamic creation of user in plsql, but these statements are not run if pls help for this error

    DECLARE

    n NUMBER.

    BEGIN

    n: = 1;

    WHILE (n < = 10)

    LOOP

    CREATE a user EM | IDENTIFIED BY KLU n;

    SESSION CREATION GRANT, GRANT ANY PRIVILEGE TO EM. n;

    COMMIT;

    n: = n + 1;

    END LOOP;

    END;

    Hello

    Here is the dynamic creation of user query and giving grants to the user,.

    DECLARE

    n NUMBER.

    cr_user VARCHAR2 (300);

    gr_user VARCHAR2 (300);

    BEGIN

    n: = 1;

    While (n<=>

    LOOP

    cr_user: = 'CREATE user EM | n | "IDENTIFIED BY KLU";

    gr_user: = "GRANT CREATE SESSION, GRANT ANY PRIVILEGE to EM '. n | '';

    EXECUTE IMMEDIATE cr_user;

    EXECUTE IMMEDIATE gr_user;

    n: = n + 1;

    END LOOP;

    END;

    Edited: Removed when OTHER exceptions to Code.

    See you soon!

  • Why this simple script script does not work

    I'm pretty new to actionscript, I have learned from books, in fact I still am.

    The script that I'll try to work on my site, worked well in the teachings of the books.

    I don't think that my buttons are different, but why don't they work then.

    Can someone figure this.

    my script:

    Stop();

    whoweare.addEventListener (MouseEvent.MOUSE_UP, onNavigate);

    function onNavigate (evt:MouseEvent): Void {}
    gotoAndPlay ("contact");
    }

    whatwedo.addEventListener (MouseEvent.MOUSE_UP, onNavigate);

    function onNavigate (evt:MouseEvent): Void {}
    gotoAndPlay ("slideshow");
    }

    Error: the class or interface 'MouseEvent' could not be loaded.

    Help?

    Dirkhou,

    void not Void in AS3

  • Why this piece of code does not work?

    Hello everyone, I am new to HTML and web design, and I'm doing a website. I created this piece of code so that when the user mouse over one of the links (jpg image) it will change the colors (I have the same image in different colors saved in the same folder).

    < ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""
    " < html xmlns =" http://www.w3.org/1999/xhtml ">
    < head >
    < meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"
    < title > < /title > XXXXXXXXXX
    < / head >

    < body bgcolor = "#000000" >
    < table width = "1050" border = "0" align = "center" cellpadding = "0" cellspacing = "0" >
    < b >
    < td > < table width = "1050" border = "0" cellspacing = "0" cellpadding = "0" >
    < b >
    < td > < img src = "_images/XXXXbanner.jpg" width = "1050" height = "311" alt = "banner" / > < table > "
    < /tr >
    < /table >
    < table width = "901" border = "0" align = "center" cellpadding = "0" cellspacing = "0" >
    < b >
    < td width = "150" > < a href = "index.html" Mm_swapimgrestore"onMouseOver =" MM_swapImage ('ButtonOne' ", ' _images/home_on.jpg', 1)" > "
    < img name = "ButtonOne" border = "0" src = "_images/home.jpg" width = "150" height = alt "75" = "home" / > < /a > < table > "
    < td width = "150" > < a href = "gallery.html" Mm_swapimgrestore"onMouseOver =" MM_swapImage ('ButtonTwo' ", ' _images/gallery_on.jpg', 1)" > "
    < img name = "ButtonTwo" border = "0" src = "_images/gallery.jpg" width = "150" height = "75" alt = "Gallery" / > < /a > < table > "
    < td width = "150" > < a href = "products.html" Mm_swapimgrestore"onMouseOver =" MM_swapImage ('ButtonThree' ", ' _images/product_on.jpg', 1)" > "
    < img name = "ButtonThree" border = "0" src = "_images/product.jpg" width = "150" height = "75" alt = "products" / > < / a > < table > "
    < td width = "150" > < a href = "store.html" Mm_swapimgrestore"onMouseOver =" MM_swapImage ('ButtonFour', ", ' _images/shop_on.jpg', 1)" > "
    < img name = "ButtonFour" border = "0" src = "_images/shop.jpg" width = "150" height = "75" alt = "store" / > < /a > < table > "
    < td width = "150" > < a href = "profile.html" Mm_swapimgrestore"onMouseOver =" MM_swapImage ('ButtonFive' ", ' _images/profile_on.jpg', 1)" > "
    < img name = "ButtonFive" border = "0" src = "_images/profile.jpg" width = "150" height = "75" alt = "profile" / > < / a > < table > "
    < td width = "151" > < a href = "contactus.html' Mm_swapimgrestore" onMouseOver ="MM_swapImage ('ButtonSix',", ' _images/contact_us_on.jpg', 1) ">"
    < img name = "ButtonSix" border = "0" src = "_images/contact_us.jpg" width = "150" height = "75" alt = "contact" / > < /a > < table > "
    < /tr >
    < /table >
    < table width = "1050" border = "0" cellspacing = "0" cellpadding = "0" >
    < b >
    < td > < table >
    < td > < table >
    < td > < table >
    < /tr >
    < /table >
    < p > < / p >
    < p > < /p > < table >
    < /tr >
    < /table >
    < / body >
    < / html >

    images and the banner appear thin and I do not have mistpyed one of the names of places/file. Why the icon does not change the colors (show image 'on') when you pass the mouse over it? Please help thanks in advance.

    * I use Adobe Dreamweaver CS4

    The head of your page contains no MM_swapImgRestore() or MM_swapImage() functions that are called by your code.

    Not sure how you have added the Beahviors yoru page.  If you have used the window of behaviours, DW should have added scripts to yoru page for you.  If you have added the code manually, then you will need to add the scripts manually.  But the easiest thing would be to simply add the behaviors of another link on the page, even a dummy, you can remove later.  This should get the scripts in the head for you.

    --

    E. Michael Brandt

    www.divaHTML.com
    www.divahtml.com/Products/scripts_dreamweaver_extensions.php
    According to the standard scripts and the Dreamweaver Extensions

    www.valleywebdesigns.com/vwd_Vdw.asp
    JustSo PictureWindow
    JustSo PhotoAlbum, and alia

    --

  • Get-VMHost version - why this export to CSV does not...

    If possible... I'm confused why the following command / export doesn't correctly but just a bunch of numbers...

    The following appears perfect on-screen:

    Notice-EEG - ViewType HostSystem-Property Name, Config.Product. Select Name, {$_.} Config.Product.FullName}, {$_.} Config.Product.Build} | FT-auto

    When I add this at the end... she translates by... Well well... a mess.

    Export-csv C:\\Hostversion.csv

    I guess I still need to figure out which exporting method to use with different commands PowerCLI...

    Thanks in Adv

    Try like this

    Notice-EEG - ViewType HostSystem-Property Name, Config.Product. Select Name, {$_.} Config.Product.FullName}, {$_.} Config.Product.Build} |

    Export-csv C:\\Hostversion.csv

  • Why creative cloud is no longer not running?

    I downloaded CC on my windows system 8 and it worked perfectly for the first days, but now the program starts at all.

    I can't access any of the applications, nor the loading screen comes on my desk.

    I tried to uninstall creative cloud of my system in the hope of resettlement, but my computer does not uninstall the program.

    I looked on all the forums... and my question does not seem to be a common.

    Can someone help me?

    uninstall, CC help | Uninstall the creative desktop application Cloud

    clean through the use of the Adobe Creative Cloud cleaning tool to solve installation problems

    then reinstall apps download Adobe Creative Cloud | CC free trial Adobe

  • Why this warning occurs? "Could not complete the move to folder. An unknown error has occurred. »

    This warning appears from time to time as I migrate my photo folders LR 3 from an internal hard drive on an iMac to a hard drive external. Folders and images appear on the external hard drive OK and are accepted by the LR database 3 Screen shot 2012-03-18 at 10.47.03 AM.jpg A greyed with zero files folder remains behind on the internal hard drive in the application of LR 3 file.

    Phil McAlary

    I discovered in at least one instance a folder of images with this warning had given no graphics inside this particular file (a file processing rich text reminding me to use some of the images in the folder). Will need to check the ten to twelve other files (migrated files that triggered the alert "cannot complete the move to folder. An unknown error has occurred. ") via the Mac Finder to see if a non file / unrecognizable remains behind in these records.

    Phil McAlary

  • Why lightroom 4 trial tells me not sufficient permissions?

    When I try to download lightroom trial t o 4 it tells me why not have permissions sufficient - and this as what it means? How to make this work?

    Thank you for the 46travels update.  Joewh is a good point is your system meet the required system configuration that is described in http://www.adobe.com/products/photoshop-lightroom/tech-specs.html.  I'm not sure why this would cause an error not sufficient permissions when you try to download the software because it is a direct download.  But it is certainly something to consider.

    To clarify, you receive permissions insufficient when you download, and when you have started the installation of the software?  You are also able to download other files successfully?  There is nothing special about Lightroom 4 other downloading there download an exe on Windows.  You are able to download other files from exe successfully?

  • Running in parallel DML not forced

    Hello

    I work with an Oracle RDBMS 12cR1,

    I amcurrently how can I influence parallel experimentation DML and parallel DDL (for example edit.

    For example, I have the following settings:

    parallel_degree_level = 100

    parallel_degree_limit = CPU

    parallel_degree_policy = MANUAL

    These are the default values.

    At this point, that means I should be able to influence the optimier through tips.

    There is no statistics on the table I want to insert data.

    I started with:

    ALTER session force parallel dml parallel 4;

    Then I have an insert of type:

    insert into table (list of aliases for column using the dbms_random package)

    Select (column list) of the double

    connect by level < = 100000;

    When I followed the execution using EM, I don't see the parallel expected excution.

    The execution plan looks like this:

    CREATE statement

    load in select

    the gathering optimizer statistics

    connect to without filtering

    double quick

    This isn't a 'great' table and select to insert is not "big".

    If because I have such a '' big, '' set that Oracle chooses not to use parallel DML had?

    How can I force parallel DML execution?

    Thanks and greetings

    Laury wrote:

    Yes, after some further tests, I discovered that connection by does not allow for parallel processing.

    Yet, I do not observe the same kind of results as you.

    Think about how a connect works by, and it must be clear that it would be very difficult to implement a parallel connection by - especially when the driving table has only one row. But you don't really want to use a simple connect by to generate a large amount of data because of the impact this can have on memory.

    Once you've worked out why you do not get the parallelism you should be found - your parallel functions ARE enabled? Your parallel_max_servers is not null (you keep do not answer the question on parallel settings)-you can introduce the strategy who joined a small "connect by" result set to itself and you give the complete end parallelism you need:

    Insert / * + parallel (second_emp, 6) * / into second_emp

    (

    EmpNo,

    Ename,

    employment,

    Bishop.

    HireDate,

    SAL,

    Comm,

    DEPTNO

    )

    with generator as)

    Select

    rownum id

    Of

    Double

    connect

    level<=>

    )

    Select

    round (dbms_random.value (1: 500000)) like empno,

    dbms_random. String name ('U', 10),

    random_job as job,

    random_mgr as Bishop,

    trunc ((sysdate-1000) + dbms_random.value (0.366)) as hiredate.

    round (dbms_random.value (800, 300)) as sal,

    -decode (rounds (dbms_random.value (0, 1401)), 1401, null, rounds (dbms_random.value (0, 1401))) as comm

    (

    case

    When ((dbms_random.value (0, 1401)) round between 1000 and 1401)

    then null

    another round (dbms_random.value (0, 1401))

    end

    ) as Comm.,

    TO_NUMBER ((substr (round (dbms_random.value (10, 30)), 1, 1) |)) '0')) as deptno

    Of

    (select 1 n2 of the generator where id)<= 100)   ="">

    (select 1 n2 of the generator where id)<= 1000)  ="">

    ;

    Note in particular the subquery WITH which will generate a small TWG internally; then the join between two copies of this table - and this join does not use the rownum or operator LEVEL. This gives you a merge join parallel that generates a large amount of data and allows the PX servers make all calls to dbms_random.

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

    | ID | Operation | Name                      | Lines | Bytes | Cost (% CPU). Time |    TQ | IN-OUT | PQ Distrib.

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

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

    |   1.  TRANSFORMATION OF THE TEMPORARY TABLE.                           |       |       |            |          |        |      |            |

    |   2.   LOAD SELECT ACE |                           |       |       |            |          |        |      |            |

    |   3.    COUNT                            |                           |       |       |            |          |        |      |            |

    |   4.     CONNECT TO WITHOUT FILTERING.                           |       |       |            |          |        |      |            |

    |   5.      QUICK DOUBLE |                           |     1.       |     2 (0) | 00:00:01 |        |      |            |

    |   6.   COORDINATOR OF PX |                           |       |       |            |          |        |      |            |

    |   7.    PX SEND QC (RANDOM). : TQ10001 |     1.    26.     5 (0) | 00:00:01 |  Q1, 01 | P-> S | QC (RAND) |

    |   8.     LOAD SELECT ACE (HYBRID TSM/HWMB) |                           |       |       |            |          |  Q1, 01 | SVCP |            |

    |   9.      OPTIMIZER STATISTICS COLLECTION |                           |     1.    26.     5 (0) | 00:00:01 |  Q1, 01 | SVCP |            |

    |  10.       THE CARTESIAN MERGE JOIN.                           |     1.    26.     5 (0) | 00:00:01 |  Q1, 01 | SVCP |            |

    |  11.        RECEIVE PX |                           |     1.    13.     2 (0) | 00:00:01 |  Q1, 01 | SVCP |            |

    |  12.         PX SEND BROADCAST | : TQ10000 |     1.    13.     2 (0) | 00:00:01 |  Q1 00 | P-> P | BROADCAST |

    | * 13 |          VIEW                       |                           |     1.    13.     2 (0) | 00:00:01 |  Q1 00 | SVCP |            |

    |  14.           ITERATOR BLOCK PX |                           |     1.    13.     2 (0) | 00:00:01 |  Q1 00 | ISSUE |            |

    | * 15 |            TABLE ACCESS FULL | SYS_TEMP_0FD9D66BC_3BA6C3 |     1.    13.     2 (0) | 00:00:01 |  Q1 00 | SVCP |            |

    |  16.        KIND OF BUFFER.                           |     1.    13.     5 (0) | 00:00:01 |  Q1, 01 | SVCP |            |

    | * 17.         VIEW                        |                           |     1.    13.            |          |  Q1, 01 | SVCP |            |

    |  18.          ITERATOR BLOCK PX |                           |     1.    13.     2 (0) | 00:00:01 |  Q1, 01 | ISSUE |            |

    | * 19.           TABLE ACCESS FULL | SYS_TEMP_0FD9D66BC_3BA6C3 |     1.    13.     2 (0) | 00:00:01 |  Q1, 01 | SVCP |            |

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

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

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

    13 - filter ("ID"<>

    15 - access(:Z>=:Z AND:Z)<>

    17 - filter ("ID"<>

    19 - access(:Z>=:Z AND:Z)<>

    Concerning

    Jonathan Lewis

  • Why is this work not running?

    Why is this work not running?
    SQL> BEGIN
      2  DBMS_SCHEDULER.RUN_JOB('EXCHANGE_PART_JOB');
      3  END;
      4  /
    BEGIN
    *
    Error in line 1:
    ORA-00911: invalid character.
    ORA-06512: in "SYS.DBMS_ISCHED", line 150
    ORA-06512: in "SYS.DBMS_SCHEDULER", line 441
    ORA-06512: in line 2
    This work follow these steps:
    CREATE OR REPLACE PROCEDURE Exchange_Partition IS
    Sql_Exchange VARCHAR2(2000);
    BEGIN
    Sql_Exchange := 'ALTER TABLE HR.GPS_LOG_HIS EXCHANGE PARTITION '||
    'udp_part'||TO_CHAR(SYSDATE-1/24,'YYYYMMDDHH24')
    ||' WITH TABLE HR.GPS_LOG';  
    EXECUTE IMMEDIATE Sql_Exchange;
    END;
    /
    Use the following program:
    BEGIN
      DBMS_SCHEDULER.create_program (
        program_name        => 'exchange_part_prog',
        program_type        => 'STORED_PROCEDURE',
        program_action      => 'EXCHANGE_PARTITION',
        --Use a database directory to replace the OS directory.
        number_of_arguments => 0,
        enabled             => TRUE,
         comments            => 'Program to exchange partitions for hr.gps_log_his table or other tables
                                 use a shell script.');
    END;
    /
    Use the following code to create the work:
    BEGIN
      DBMS_SCHEDULER.create_job (
        job_name      => 'exchange_part_job',
        program_name  => 'exchange_part_prog',
        schedule_name => 'exchange_part_hourly_schedule',
        enabled       => TRUE,
        auto_drop     => false,
        comments      => 'Job defined to exchange partitions for gps_log_his table or orhter tables.');
    END;
    /

    Ok

    ORA-14099: all rows in the table are not eligible for the specified partition
    Cause: There is at least one line in the non-partitioned table which does not qualify for the partition specified in the PARTITION of EXCHANGE ALTER TABLE
    Action: Ensure that all the lines in the segment qualify for the partition. Perform the operation table alter with the NO CHECK option. Run ANALYZE table VALIDATE on that partition, namely the invalid rows and delete them.

    I think you should check the data in gps_log, some lines must belog to another partition?

    Concerning
    Peter

  • 12 c call Webservice JDeveloper get "SQL string is not a DML statement" as a SQLException exception

    Hi guys,.

    I developed a java class to access the database using the OracleDataSource class and run a SQL query with a select statement. It works very well. I have built a wrapper class and as a Web service. I get "SQL string is not a DML statement" as a SQLException exception when I run as a Web service, but it works very well as an application.

    No idea why I get this error? Not sure why WebSercie is having a problem while this works as an application.

    Thank you and best regards,

    Srini Mel

    Solved the problem by myself.

    The first release "SQL string is not a DML statement" is due to an additional line (pstmt2.executeUpdate ()) in the code.

    Second question, receives not the query response is due to bad user input. I walked into 13.21651 instead of 31.21651.

    Thank you!

    Srini

  • Oracle 11.2 - perform parallel DML on a table that is not partitioned with LOB column

    Hello

    Since I wanted to demonstrate the new enhancements of Oracle 12 c on SECUREFICHIERS, I tried to use PDML declarations on a table that is not partitioned with LOB column, in Oracle 11 g and Oracle 12 c releases. The Oracle 11.2 SECUREFICHIERS and large objects Developer Guide January 2013 said clearly:

    Parallel execution of the following DML operations on tables with LOB columns is supported. These operations performed in parallel run only mode when it is run on a partitioned table. The DML statements on tables not partitioned with LOB columns continue to run in serial execution mode.

    • INSERT SELECT AS
    • CREATE TABLE AS SELECT
    • DELETE
    • UPDATE
    • MERGE (conditionally UPDATE and INSERT)
    • Multi-table INSERT

    So, I created and filled a simple table with a BLOB column:

    SQL> CREATE TABLE T1 (A BLOB);
    Table created.
    

    Then, I tried to see the execution of a parallel ABOLITION plan:

    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 ended up 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 was executed in 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 this normal? It is not supposed to be supported on Oracle 11 g with no partitioned table containing the LOB column...

    Thank you for your help.

    Michael

    Hello

    The explain plan shows that only the query is run in parallel but not delete it.

    Concerning

    Maurice

Maybe you are looking for