Behavior of high N lines updated with subquery sessions and parallel

Hello

I have the following scenario:

{code}

SQL > create table aaa12 (date start_time, id1 number (1) Primary key, the number of status)

((1), buffer_id number (2) default null);

Table created.

SQL > insert into aaa12 (the value of start_time, id1, status)

trunc(sysdate-level) select 2, level 6, 1 double

3. connect by level < 6;

5 rows created.

SQL > validation

2;

Validation complete.

SQL > select * from aaa12;

START_TIM STATUS BUFFER_ID ID1

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

JUNE 10, 13 5 1

JUNE 9, 13 4 1

JUNE 8, 13 3 1

JUNE 7, 13 2 1

JUNE 6, 13 1 1

SQL > update aaa12

2 set buffer_id = 1,

3 status = 2

4 where in (select id1 id1

5 of (select id1

aaa12 6

7 where status = 1

Order 8 by start_time ASC)

9 where rownum < = 2)

10 - and status = 1

11;

2 lines to date.

{code}

Notice that I have not yet commit.

Now on a 2nd session I play the same update, only set buffer_id = 2:

{code}

SQL > update aaa12

2 set buffer_id = 2,

3 status = 2

4 where rowid in (select rowid

5 of (select rowid

aaa12 6

7 where status = 1

Order 8 by start_time ASC)

9 where rownum < = 2)

10 - and status = 1

11;

{code}

Expectations of update above (locked). Now let's commit the 1st session:

{code}

Validation complete.

SQL > select * from aaa12;

START_TIM STATUS BUFFER_ID ID1

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

JUNE 10, 13 5 1

JUNE 9, 13 4 1

JUNE 8, 13 3 1

JUNE 7, 13 2 2 1

JUNE 6, 13 1 2 1

SQL >

{code}

and we'll see what happened during the 2nd session:

{code}

2 lines to date.

SQL >-after 1st session committed

SQL > select * from aaa12;

START_TIM STATUS BUFFER_ID ID1

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

JUNE 10, 13 5 1

JUNE 9, 13 4 1

JUNE 8, 13 3 1

JUNE 7, 13 2 2 2

JUNE 6, 13 1 2 2

SQL >

{code}

It updated the same lines, even if their status should no longer be 1 committed after 1st session.

I guess what happens is that the subquery is performed on the time of execution of the update statement - which means that the subquery is read so coherent to reinstate the same lines.

but now if I do the same thing, but a comment the external status = 1 as part of the where the update in addition to the subquery - it seems to work:

I dropped the table, recreated, inserted the same 5 lines and now start the new updates:

{code}

SQL > update aaa12

2 set buffer_id = 1,

3 status = 2

4 where in (select id1 id1

5 of (select id1

aaa12 6

7 where status = 1

Order 8 by start_time ASC)

9 where rownum < = 2)

10 and status = 1

11;

2 lines to date.

SQL > select * from aaa12;

START_TIM STATUS BUFFER_ID ID1

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

JUNE 10, 13 5 1

JUNE 9, 13 4 1

JUNE 8, 13 3 1

JUNE 7, 13 2 2 1

JUNE 6, 13 1 2 1

{code}

updated even with buffer_id = 2 on 2nd session:

{code}

SQL > update aaa12

2 set buffer_id = 2,

3 status = 2

4 where rowid in (select rowid

5 of (select rowid

aaa12 6

7 where status = 1

Order 8 by start_time ASC)

9 where rownum < = 2)

10 and status = 1

11;

{code}

session is locked, now after commit 1st session - session 2 updated and table looks like:

{code}

2 lines to date.

SQL > select * from aaa12;

START_TIM STATUS BUFFER_ID ID1

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

JUNE 10, 13 5 1

JUNE 9, 13 4 2 2

JUNE 8, 13 3 2 2

JUNE 7, 13 2 2 1

JUNE 6, 13 1 2 1

{code}

I have 2 questions:

1. How is the 2nd scenario works and the subquery does not limit the update for the same 2 lines so that the update will update anything?

2 in case I have a table with many rows and I need to process the records in order, but want to do it in parallel - if I have 1000 lines of process and each session can handle 500 - I don't want to wait for the other, but work on different lines simultaneously. Is this possible without having to open a cursor with a SELECT... UPDATE SKIP LOCKED? because then I would have more than 500 lines of loop and do an update by records, which seems unwise to good performance.

Any help/advice would be appreciated.

Thank you

-Mor

Sorry, I missed a major difference between the two cases. And it's write consistency. There are some situations where UPDATE or DELETE are realizing that they cannot maintain consistency of statement-level and are forced to do a restore 'mini' (which may not be so "tiny") and start over. One of these cases is as follows. We have a UPDATE/DELETE with a WHERE clause. So we start to extract the rows that match WHERE clause. And we meet a line whose value to adapt the WHERE clause when statement has started now, but it is not. And that's exactly what is happening here. When the session 2 publishes the UPDATED session 1 did not err again. As a result, lines of June 6 & 7 correspond to the WHERE clause and must therefore be updated. However, they are locked by session 1. When the session commits 1, locks are released and session 2 could proceed with the updating of these two lines. However, to write rules of coherence mandate session 2 to check if WHERE clause is always true and realize that it's not. This causes a mini-restauration and UPDATE again. Now sinus session already committed 1, session 2 sees all of the changes and lines of June 6 & 7 do not match WHERE clause more (status = 2). So first of all (by START_TIM) two rows with STATUS = 1 are now June 8 & 9. That is why the session 2 updates the.

SY.

Tags: Database

Similar Questions

  • Update with the join and group by

    Hi all

    I'm currently updating multiple columns in a table from an inner join query.
    First one recover the affected rows and values that I need for the update (which I call this subquery ED_Query).
    It is important to note that this subquery has a group of and and the having clause.

    My first attempt (using the query running in the SQL Server query) fails:

    SQL > update ED_Update
    2 set ED_Update.dtHoraInicioReal = ED_Query.dtHoraInicioReal,
    3 ED_Update.dtHoraFinReal = ED_Query.dtHoraFinReal,
    4 ED_Update.fPorcentajeRealizado = ED_Query.fPorcentajeRealizado
    HISTORICOS_AVANZA 5. HSAE_HIS_EXPEDICIONDIARIA ED_Update
    inner join 6)
    7. select distinct ED.iIdExpedicion, ED.iIdExpedicionDiaria,
    8 MAX (PT.iOrdenEnTrayecto) + 1 as iNumParadas,
    9 MAX (HPP.iOrden) as iOrdenUltimaParada,
    10 MIN (dtHora_LlegadaReal + iTiempoEnParada /(24*60*60)) as dtHoraInicioReal,
    11 MAX (dtHora_LlegadaReal) as dtHoraFinReal,
    12 100 * cast ((MAX (HPP.iOrden) + 1) as float) / cast ((MAX (PT.iOrdenEnTrayecto) + 1) as float) as fPorcentajeRealizado
    13 of HISTORICOS_AVANZA. ED HSAE_HIS_EXPEDICIONDIARIA
    14 left join HISTORICOS_AVANZA. HSAE_HIS_HORAPASOPARADA HPP
    15 ED.iIdExpedicion = HPP.iIdExpedicion and ED.dtJornada = HPP.dtJornada
    16 left join AVANZA. SAE_URB_PARADASTRAYECTO PT on ED.iIdLinea = PT.iIdLinea and ED.iIdTrayecto = PT.iIdTrayecto
    17 where ED.dtJornada = TO_DATE (January 14, 2013 ',' DD/MM/YYYY ') and ED.iIdExpedicion in (-131076)
    18 ED.iIdExpedicion, ED.iIdExpedicionDiaria, ED.dtHoraInicioReal, ED.dtHoraFinReal group
    19 having ED.dtHoraInicioReal <>min (dtHora_LlegadaReal + iTiempoEnParada /(24*60*60))
    20 or ED.dtHoraFinReal <>max (dtHora_LlegadaReal)
    (21) ED_Query
    22 we ED_Update.iIdExpedicionDiaria = ED_Query.iIdExpedicionDiaria;

    ERROR on line 5:
    ORA-00933: SQL not correctly completed command.

    Subquery (ED_Query) work fine in Oracle, so I suspect that the problems are when I mix with the update clause.

    SQL > select distinct ED.iIdExpedicion, ED.iIdExpedicionDiaria,.
    2 MAX (PT.iOrdenEnTrayecto) + 1 as iNumParadas,
    3 MAX (HPP.iOrden) as iOrdenUltimaParada,
    4 MIN (dtHora_LlegadaReal + iTiempoEnParada /(24*60*60)) as dtHoraInicioReal,
    5 MAX (dtHora_LlegadaReal) as dtHoraFinReal,
    6 100 * cast ((MAX (HPP.iOrden) + 1) as float) / cast ((MAX (PT.iOrdenEnTrayecto) + 1) as float) as fPorcentajeRealizado,
    7 ED.dtHoraInicioReal ED_dtHoraInicioReal, ED.dtHoraFinReal as ED_dtHoraFinReal, ED.fPorcentajeRealizado as ED_fPorcentajeRealizado
    8 of HISTORICOS_AVANZA. ED HSAE_HIS_EXPEDICIONDIARIA
    9 left join HISTORICOS_AVANZA. HSAE_HIS_HORAPASOPARADA HPP
    10 on ED.iIdExpedicion = HPP.iIdExpedicion and ED.dtJornada = HPP.dtJornada
    11 left join AVANZA. SAE_URB_PARADASTRAYECTO PT on ED.iIdLinea = PT.iIdLinea and ED.iIdTrayecto = PT.iIdTrayecto
    where the ED.dtJornada 12 = TO_DATE (January 14, 2013 ',' DD/MM/YYYY ') and ED.iIdExpedicion in (-131076)
    13 group of ED.iIdExpedicion, ED.iIdExpedicionDiaria, ED.dtHoraInicioReal, ED.dtHoraFinReal, ED.fPorcentajeRealizado
    14 after ED.dtHoraInicioReal <>min (dtHora_LlegadaReal + iTiempoEnParada /(24*60*60))
    15 or ED.dtHoraFinReal <>max (dtHora_LlegadaReal);

    IIDEXPEDICION IIDEXPEDICIONDIARIA INUMPARADAS IORDENULTIMAPARADA DTHORAINI
    ------------- ------------------- ----------- ------------------ ---------
    DTHORAFIN FPORCENTAJEREALIZADO ED_DTHORA ED_DTHORA ED_FPORCENTAJEREALIZADO
    --------- -------------------- --------- --------- -----------------------
    -131076 5662 406 15 JANUARY 13
    15 JANUARY 13 JANUARY 15, 13 15 JANUARY 13 0

    -131076 5663 406 15 JANUARY 13
    15 JANUARY 13 JANUARY 15, 13 15 JANUARY 13 0

    -131076 5664 406 15 JANUARY 13
    15 JANUARY 13 JANUARY 15, 13 15 JANUARY 13 0

    After reading this forum, I have change the query and try the following:

    SQL > UPDATE
    () 2
    3. select distinct ED.iIdExpedicion, ED.iIdExpedicionDiaria,
    4 MAX (PT.iOrdenEnTrayecto) + 1 as iNumParadas,
    5 MAX (HPP.iOrden) as iOrdenUltimaParada,
    6 MIN (dtHora_LlegadaReal + iTiempoEnParada /(24*60*60)) as dtHoraInicioReal,
    7 MAX (dtHora_LlegadaReal) as dtHoraFinReal,
    8 100 * cast ((MAX (HPP.iOrden) + 1) as float) / cast ((MAX (PT.iOrdenEnTrayecto) + 1) as float) as fPorcentajeRealizado,
    9 ED.dtHoraInicioReal ED_dtHoraInicioReal, ED.dtHoraFinReal as ED_dtHoraFinReal, ED.fPorcentajeRealizado as ED_fPorcentajeRealizado
    HISTORICOS_AVANZA 10. ED HSAE_HIS_EXPEDICIONDIARIA
    11 left join HISTORICOS_AVANZA. HSAE_HIS_HORAPASOPARADA HPP
    12 on ED.iIdExpedicion = HPP.iIdExpedicion and ED.dtJornada = HPP.dtJornada
    13 left join AVANZA. SAE_URB_PARADASTRAYECTO PT on ED.iIdLinea = PT.iIdLinea and ED.iIdTrayecto = PT.iIdTrayecto
    14 where ED.dtJornada = TO_DATE (January 14, 2013 ',' DD/MM/YYYY ') and ED.iIdExpedicion in (-131076)
    Group 15 of ED.iIdExpedicion, ED.iIdExpedicionDiaria, ED.dtHoraInicioReal, ED.dtHoraFinReal, ED.fPorcentajeRealizado
    16 having ED.dtHoraInicioReal <>min (dtHora_LlegadaReal + iTiempoEnParada /(24*60*60))
    17 or ED.dtHoraFinReal <>max (dtHora_LlegadaReal)
    18)
    19 SET ED_dtHoraInicioReal = dtHoraInicioReal,
    20 ED_dtHoraFinReal = dtHoraFinReal,
    21 ED_fPorcentajeRealizado = fPorcentajeRealizado;

    ERROR on line 2:
    ORA-01732: operation non-legal data manipulation on this point of view

    Little help?

    Thanl in advance.

    Published by: 984483 on 28-ene-2013 01:48

    Hello

    Thanks for posting the CREATE TABLE and INSERT.
    Don't forget to post the desired results of these sample data, i.e. the content of the or the tables changed after the UPDATE is made.

    Is that what you want ed_update to look like after that everyhting is finished?

    DATE01      NUMBERMAX  NUMBERSUM
    ---------- ---------- ----------
    01/01/2013         30         60
    02/01/2013          0          0
    03/01/2013          0          0
    

    If so, here's a way to do it:

    UPDATE     ed_update     u
    SET     (numbermax, numbersum) =
         (
                 SELECT  MAX (number01)
              ,     SUM (number01)
              FROM     ed_query
              WHERE     date01     = u.date01
         )
    WHERE     date01     = TO_DATE ('01/01/2013', 'DD/MM/YYYY')   -- If wanted
    ;
    

    In Oracle, INNER JOIN works only in the FROM clause of a SELECT statement.
    When you want to update a table with values from another table, you can do a subquery correlated (as I showed above) or use the MERGER instead of UPDATE.

  • Cannot install the windows updates with error 80240016 and 646 code

    I tried to download updates manually and automatically. There are 14 of them, but nothing helped. I have a windows vista OS and I tried to find the error codes in line staring at me but still not joy. can help you. all updates, I think that refer to microsoft office and the student that is installed on my computor.

    Hi Tina500,

    Thank you for using the Microsoft Windows Vista Forums.

    You probably found this error message because

    Windows Installer is outdated.

    Here is a link to an article that addresses this issue

    http://support.Microsoft.com/kb/957308

    If please reply and let us know if your problem is resolved or if you need further assistance

    David O
    Microsoft Answers Support Engineer
    Visit our and tell us what you think.

  • Doesn't have installation of Vista updates. He continues to try set up the third update with 0% completion and then it turns off and start again from the beginning. Keep in the loop... Help! There is no error message.

    As above. He is not in windows more simply the third update installation and then turns off computer and restart new since the beginning. Tried running safe mode but without success

    Restore point:

    Try typing F8 at startup and in the list of Boot selections, select Mode safe using ARROW top to go there > and then press ENTER.

    Try a restore of the system once, to choose a Restore Point prior to your problem...

    Click Start > programs > Accessories > system tools > system restore > choose another time > next > etc.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     

    If restore work not and you do not have a Vista DVD from Microsoft, do a repair disc to do a Startup Repair:

    Download the ISO on the link provided and make a record of repair time it starts.

    Go to your Bios/Setup, or the Boot Menu at startup and change the Boot order to make the DVD/CD drive 1st in the boot order, then reboot with the disk in the drive.

    At the startup/power on you should see at the bottom of the screen either F2 or DELETE, go to Setup/Bios or F12 for the Boot Menu.

    When you have changed that, insert the Bootable disk you did in the drive and reboot.

    http://www.bleepingcomputer.com/tutorials/tutorial148.html

    Link above shows what the process looks like and a manual, it load the repair options.

    NeoSmart containing the content of the Windows Vista DVD 'Recovery Centre', as we refer to him. It cannot be used to install or reinstall Windows Vista, and is just a Windows PE interface to recovering your PC. Technically, we could re-create this installation with downloadable media media freely from Microsoft (namely the Microsoft WAIK, several gigabyte download); but it is pretty darn decent of Microsoft to present Windows users who might not be able to create such a thing on their own.

    Read all the info on the website on how to create and use it.

    http://NeoSmart.net/blog/2008/Windows-Vista-recovery-disc-download/

    ISO Burner: http://www.snapfiles.com/get/active-isoburner.html

    It's a very good Vista startup repair disk.

    You can do a system restart tool, system, etc it restore.

    It is NOT a disc of resettlement.

    And the 32-bit is what normally comes on a computer, unless 64-bit.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    If the above does not resolve the problem:

    Windows Update Forum:

    It comes with Vista, upgrade install and activate Forum.

    You will get the best help for any problem of Update/Service Pack in the Windows Update Forum; the link below:

    http://social.answers.Microsoft.com/forums/en-us/vistawu/threads

    When you repost here, kindly include the Error Codes, and exactly what is happening when you try to update.

    In this way, you will receive the best help.

    See you soon.

    Mick Murphy - Microsoft partner

  • rectangle with a circle line dotted with rounded corners and equal distance

    I'm a fan of the Illustrator who needs assistance to create a rounded rectangle with a circle dotted line and also spaced circles.  any help would be greatly appreciated.  Thank you!

    If I understand what you're asking correctly, I think all you have to do is create your rectangle rounded using the rounded Rectangle tool and then apply a brush model with the 'circle dotted line. " To create the model of brush, simply use the Ellipse tool to draw a circle/point forms the same size as the points you want to make your line dotted, then drag the circle/dot to the Palette. The dialog new brush will appear when you do this. Select the new brush model, then click on 'OK '. The model brush Option dialog box will appear next. In the text spacing box, enter 100% (this will give you a space between each point equal to the same size as the dot). In addition, if you want to be able to change the colour of the points, select shades and nuances in the dropdown under the colorization of methods. (see attachment) Click 'OK' and your new brush model should now appear in your Palette of forms. All you have to do now is to select your rectangle rounded with the Selection tool and click your new brush palette forms to apply.

    If your points are bigger or smaller you want once you apply, you can change the size of the points by double-clicking on your brush pattern in the Palette forms and changing the value of the scale.

  • Win 7 will not update with 9 59 and 643 error Codes

    Were you able to copy and paste all command at the command prompt? It is normal that FORFILES to have a/c more than once as long as the other/c is contained in the order framed by double quotes.

    If in case you weren't able to copy the entire command, there is a possibility that he will not run.

    See screenshot below for the examples provided by the Forfiles command:

    Please repeat the steps listed above and an update on how it goes.

    Any new ideas?

    Please consider running Disk Cleanup, "Cleaning Windows Update" option. This operation requires a reboot that you won't be prompted to enter.

    Best regards, VZ

  • PDF. JS is no longer compatible with Firefox 35 and more. Why is it not be deleted?

    Noticed that PDF Viewer PDF. JS is not compatible with Firefox version 35 and more.
    Then why not delete it?
    Wine

    Since you have already installed, why not just update?

    For what is 'user' vs 'Developer', like the other reviewer mentioned, pdf.js is already integrated into Firefox for quite some time now and is enabled by default. There is nothing that needs to be installed unless you want to keep testing the 'extension' version which updates with new features and fixes more frequently than update of 6 calendar weeks for versions of Firefox. If this is the case, just update.

    https://github.com/Mozilla/PDF.js
    Scroll to the getting started > browser Extensions, Firefox-> development Version = click on it - then 'Allow' the hanging door that appears below the address bar on the left side.

    I saw your answer 2nd straight - on PDF. JS modules Web site. I don't see that what listed there more. I have no idea if or why it was deleted, but it will always update this area for users who have already installed. If someone else wants the extension, I guess they will have to get it from GitHub. I can only speculate that, overall, it is sufficiently developed by now that Mozilla doesn't have users more to test the advanced version and code that comes in Firefox works well enough.

  • the lines updated in response to conditions in the subquery is me stumping

    Database is 10 gr 2

    Application admin wants me to change the values in a column (col_1) in a table where the lines meet the following condition

    Select 1.col_1

    of OQ.table_a 1, OQ.table_b 2

    where

    1.col_2 = 2.col2

    and 2.col_3 = 0 ' '

    and 2.col_4 = 'abcd '.

    and 1.col_1 = '0'

    This query returns 750 lines, I want to change 1.col_1 to '1' in all these lines, so I run:

    Update OQ.table_a set 1.col_1 = '1'

    where 1.col_1 in

    (

    Select 1.col_1

    of OQ.table_a 1, OQ.table_b 2

    where

    1.col_2 = 2.col2

    and 2.col_3 = '0'

    and 2.col_4 = 'abcd '.

    and 1.col_1 = '0'

    )

    and I get 1095 lines updated and must roll back.

    I have not worked with SQL in a while and miss me something real simple here - any ideas?

    Thanks in advance

    All ranks your subquery returns aura col1 = 0 because it is part of your WHERE clause. So where clause contained in the outer query is essentially saying 'where 1.col1 = 0' If you update each line that contains a 0 in col1. This table has a primary key, if so

    Update OQ.table_a set 1.col_1 = '1'

    where 1.primary_key in

    (

    Select 1.primary_key

    of OQ.table_a 1, OQ.table_b 2

    where

    1.col_2 = 2.col2

    and 2.col_3 = '0'

    and 2.col_4 = 'abcd '.

    and 1.col_1 = '0'

    )

    If there is no primary key do not use rowid.

  • How to improve an update with a correlated subquery

    Hi all

    Could someone please some help or advice?
    I try to do the next update with correlated subquery to get all records from updatedl in the table PSI (700 k records)
    update /*+ parallel(psi 4) */ psi psi
    set PREMIERE_VENTE =
           (select min(eve.dateve) 
            from eve, evp 
            where eve.codsoc = evp.codsoc and eve.achvte = evp.achvte and eve.typeve = evp.typeve and eve.numeve = evp.numeve 
            and eve.codsoc = psi.num_mag and eve.achvte = 'V' and eve.typeve in('TIC','FAV') 
            and eve.dateve between '20090101' and '20091231' and evp.codpro = psi.ref_pro)
    Of course, it takes a long time to do the update. I tried to do in num_mag (I have 73 distinct values, and for each distinct value, I have about 9 k lines)
    and it took about 8 minutes, updating the 9000 lines. OK, that's a total of nearly 10 hours. But I need to run 15 similar updates and it's a lot of time.
    Not only that, but during the night, that we have a lot of running batches, so I am not able to run for 24/24.

    Here is the plan of the explain command:
    PLAN_TABLE_OUTPUT                                                                                                                                                                                                                                         
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Plan hash value: 1857481200                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                              
    -----------------------------------------------------------------------------------------------------------------------------------------------------                                                                                                     
    | Id  | Operation                               | Name         | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |    TQ  |IN-OUT| PQ Distrib |                                                                                                     
    -----------------------------------------------------------------------------------------------------------------------------------------------------                                                                                                     
    |   0 | UPDATE STATEMENT                        |              |   704K|    15M|   583   (5)| 00:00:02 |       |       |        |      |            |                                                                                                     
    |   1 |  UPDATE                                 | PSI          |       |       |            |          |       |       |        |      |            |                                                                                                     
    |   2 |   PX COORDINATOR                        |              |       |       |            |          |       |       |        |      |            |                                                                                                     
    |   3 |    PX SEND QC (RANDOM)                  | :TQ10000     |   704K|    15M|   583   (5)| 00:00:02 |       |       |  Q1,00 | P->S | QC (RAND)  |                                                                                                     
    |   4 |     PX BLOCK ITERATOR                   |              |   704K|    15M|   583   (5)| 00:00:02 |       |       |  Q1,00 | PCWC |            |                                                                                                     
    |   5 |      TABLE ACCESS FULL                  | PSI          |   704K|    15M|   583   (5)| 00:00:02 |       |       |  Q1,00 | PCWP |            |                                                                                                     
    |   6 |   SORT AGGREGATE                        |              |     1 |    50 |            |          |       |       |        |      |            |                                                                                                     
    |*  7 |    HASH JOIN                            |              |     1 |    50 |    34   (3)| 00:00:01 |       |       |        |      |            |                                                                                                     
    |   8 |     PARTITION RANGE SINGLE              |              |    22 |   550 |    23   (0)| 00:00:01 |   KEY |   KEY |        |      |            |                                                                                                     
    |   9 |      PARTITION LIST SINGLE              |              |    22 |   550 |    23   (0)| 00:00:01 |   KEY |   KEY |        |      |            |                                                                                                     
    |  10 |       INLIST ITERATOR                   |              |       |       |            |          |       |       |        |      |            |                                                                                                     
    |  11 |        TABLE ACCESS BY LOCAL INDEX ROWID| EVP          |    22 |   550 |    23   (0)| 00:00:01 |   KEY |   KEY |        |      |            |                                                                                                     
    |* 12 |         INDEX RANGE SCAN                | PPP_EVP_IDX1 |     1 |       |     5   (0)| 00:00:01 |   KEY |   KEY |        |      |            |                                                                                                     
    |  13 |     PARTITION RANGE SINGLE              |              |    57 |  1425 |    10   (0)| 00:00:01 |   KEY |   KEY |        |      |            |                                                                                                     
    |  14 |      PARTITION LIST SINGLE              |              |    57 |  1425 |    10   (0)| 00:00:01 |   KEY |   KEY |        |      |            |                                                                                                     
    |  15 |       INLIST ITERATOR                   |              |       |       |            |          |       |       |        |      |            |                                                                                                     
    |  16 |        TABLE ACCESS BY LOCAL INDEX ROWID| EVE          |    57 |  1425 |    10   (0)| 00:00:01 |   KEY |   KEY |        |      |            |                                                                                                     
    |* 17 |         INDEX RANGE SCAN                | EVE_M_IDX1   |     1 |       |     4   (0)| 00:00:01 |   KEY |   KEY |        |      |            |                                                                                                     
    -----------------------------------------------------------------------------------------------------------------------------------------------------                                                                                                     
                                                                                                                                                                                                                                                              
    Query Block Name / Object Alias (identified by operation id):                                                                                                                                                                                             
    -------------------------------------------------------------                                                                                                                                                                                             
                                                                                                                                                                                                                                                              
       1 - UPD$1                                                                                                                                                                                                                                              
       5 - UPD$1 / PSI@UPD$1                                                                                                                                                                                                                                  
       6 - SEL$1                                                                                                                                                                                                                                              
      11 - SEL$1 / EVP@SEL$1                                                                                                                                                                                                                                  
      12 - SEL$1 / EVP@SEL$1                                                                                                                                                                                                                                  
      16 - SEL$1 / EVE@SEL$1                                                                                                                                                                                                                                  
      17 - SEL$1 / EVE@SEL$1                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                              
    Predicate Information (identified by operation id):                                                                                                                                                                                                       
    ---------------------------------------------------                                                                                                                                                                                                       
                                                                                                                                                                                                                                                              
       7 - access("EVE"."CODSOC"="EVP"."CODSOC" AND "EVE"."ACHVTE"="EVP"."ACHVTE" AND "EVE"."TYPEVE"="EVP"."TYPEVE" AND                                                                                                                                       
                  "EVE"."NUMEVE"="EVP"."NUMEVE")                                                                                                                                                                                                              
      12 - access("EVP"."CODSOC"=TO_NUMBER(:B1) AND "EVP"."ACHVTE"='V' AND ("EVP"."TYPEVE"='FAV' OR "EVP"."TYPEVE"='TIC') AND "EVP"."CODPRO"=:B2)                                                                                                             
      17 - access("EVE"."CODSOC"=TO_NUMBER(:B1) AND "EVE"."ACHVTE"='V' AND ("EVE"."TYPEVE"='FAV' OR "EVE"."TYPEVE"='TIC') AND                                                                                                                                 
                  "EVE"."DATEVE">='20090101' AND "EVE"."DATEVE"<='20091231')                                                                                                                                                                                  
           filter(SUBSTR("EVE"."DATEVE",1,6)>='200901' AND SUBSTR("EVE"."DATEVE",1,6)<='200912')                                                                                                                                                              
                                                                                                                                                                                                                                                              
    Column Projection Information (identified by operation id):                                                                                                                                                                                               
    -----------------------------------------------------------                                                                                                                                                                                               
                                                                                                                                                                                                                                                              
       2 - (upd=4; cmp=2,3) "SYS_ALIAS_2".ROWID[ROWID,10], "PSI"."NUM_MAG"[VARCHAR2,12], "PSI"."REF_PRO"[VARCHAR2,16],                                                                                                                                        
           "PREMIERE_VENTE"[CHARACTER,8]                                                                                                                                                                                                                      
       3 - (#keys=0) "SYS_ALIAS_2".ROWID[ROWID,10], "PSI"."NUM_MAG"[VARCHAR2,12], "PSI"."REF_PRO"[VARCHAR2,16], "PREMIERE_VENTE"[CHARACTER,8]                                                                                                                 
       4 - "SYS_ALIAS_2".ROWID[ROWID,10], "PSI"."NUM_MAG"[VARCHAR2,12], "PSI"."REF_PRO"[VARCHAR2,16], "PREMIERE_VENTE"[CHARACTER,8]                                                                                                                           
       5 - "SYS_ALIAS_2".ROWID[ROWID,10], "PSI"."NUM_MAG"[VARCHAR2,12], "PSI"."REF_PRO"[VARCHAR2,16], "PREMIERE_VENTE"[CHARACTER,8]                                                                                                                           
       6 - (#keys=0) MIN("EVE"."DATEVE")[8]                                                                                                                                                                                                                   
       7 - (#keys=4) "EVP"."CODSOC"[NUMBER,22], "EVE"."CODSOC"[NUMBER,22], "EVP"."ACHVTE"[VARCHAR2,1], "EVE"."ACHVTE"[VARCHAR2,1],                                                                                                                            
           "EVP"."TYPEVE"[VARCHAR2,3], "EVE"."TYPEVE"[VARCHAR2,3], "EVP"."NUMEVE"[NUMBER,22], "EVE"."NUMEVE"[NUMBER,22], "EVP".ROWID[ROWID,10],                                                                                                               
           "EVP"."CODPRO"[VARCHAR2,16], "EVE".ROWID[ROWID,10], "EVE"."DATEVE"[VARCHAR2,8]                                                                                                                                                                     
       8 - "EVP".ROWID[ROWID,10], "EVP"."ACHVTE"[VARCHAR2,1], "EVP"."TYPEVE"[VARCHAR2,3], "EVP"."NUMEVE"[NUMBER,22],                                                                                                                                          
           "EVP"."CODPRO"[VARCHAR2,16], "EVP"."CODSOC"[NUMBER,22]                                                                                                                                                                                             
       9 - "EVP".ROWID[ROWID,10], "EVP"."ACHVTE"[VARCHAR2,1], "EVP"."TYPEVE"[VARCHAR2,3], "EVP"."NUMEVE"[NUMBER,22],                                                                                                                                          
           "EVP"."CODPRO"[VARCHAR2,16], "EVP"."CODSOC"[NUMBER,22]                                                                                                                                                                                             
      10 - "EVP".ROWID[ROWID,10], "EVP"."ACHVTE"[VARCHAR2,1], "EVP"."TYPEVE"[VARCHAR2,3], "EVP"."NUMEVE"[NUMBER,22],                                                                                                                                          
           "EVP"."CODPRO"[VARCHAR2,16], "EVP"."CODSOC"[NUMBER,22]                                                                                                                                                                                             
      11 - "EVP".ROWID[ROWID,10], "EVP"."ACHVTE"[VARCHAR2,1], "EVP"."TYPEVE"[VARCHAR2,3], "EVP"."NUMEVE"[NUMBER,22],                                                                                                                                          
           "EVP"."CODPRO"[VARCHAR2,16], "EVP"."CODSOC"[NUMBER,22]                                                                                                                                                                                             
      12 - "EVP".ROWID[ROWID,10], "EVP"."CODSOC"[NUMBER,22], "EVP"."ACHVTE"[VARCHAR2,1], "EVP"."TYPEVE"[VARCHAR2,3], "EVP"."CODPRO"[VARCHAR2,16]                                                                                                              
      13 - "EVE".ROWID[ROWID,10], "EVE"."ACHVTE"[VARCHAR2,1], "EVE"."TYPEVE"[VARCHAR2,3], "EVE"."NUMEVE"[NUMBER,22], "EVE"."DATEVE"[VARCHAR2,8],                                                                                                              
           "EVE"."CODSOC"[NUMBER,22]                                                                                                                                                                                                                          
      14 - "EVE".ROWID[ROWID,10], "EVE"."ACHVTE"[VARCHAR2,1], "EVE"."TYPEVE"[VARCHAR2,3], "EVE"."NUMEVE"[NUMBER,22], "EVE"."DATEVE"[VARCHAR2,8],                                                                                                              
           "EVE"."CODSOC"[NUMBER,22]                                                                                                                                                                                                                          
      15 - "EVE".ROWID[ROWID,10], "EVE"."ACHVTE"[VARCHAR2,1], "EVE"."TYPEVE"[VARCHAR2,3], "EVE"."NUMEVE"[NUMBER,22], "EVE"."DATEVE"[VARCHAR2,8],                                                                                                              
           "EVE"."CODSOC"[NUMBER,22]                                                                                                                                                                                                                          
      16 - "EVE".ROWID[ROWID,10], "EVE"."ACHVTE"[VARCHAR2,1], "EVE"."TYPEVE"[VARCHAR2,3], "EVE"."NUMEVE"[NUMBER,22], "EVE"."DATEVE"[VARCHAR2,8],                                                                                                              
           "EVE"."CODSOC"[NUMBER,22]                                                                                                                                                                                                                          
      17 - "EVE".ROWID[ROWID,10], "EVE"."CODSOC"[NUMBER,22], "EVE"."ACHVTE"[VARCHAR2,1], "EVE"."TYPEVE"[VARCHAR2,3], "EVE"."DATEVE"[VARCHAR2,8]                                                                                                               
    Oracle version is:
     Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit 
    ...
    And my Optimizer Parms are:

    SQL > show parameter optimizer
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    optimizer_dynamic_sampling           integer     2
    optimizer_features_enable            string      10.2.0.3
    optimizer_index_caching              integer     0
    optimizer_index_cost_adj             integer     100
    optimizer_mode                       string      FIRST_ROWS_100
    optimizer_secure_view_merging        boolean     TRUE
    SQL>
    SQL> show parameter cursor_sharing
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    cursor_sharing                       string      EXACT
    SQL> column sname format a20
    SQL> column pname format a20
    SQL> column pval2 format a20
    SQL>     select
      2  sname,pname,pval1,pval2
      3  from sys.aux_stats$;
    
    SNAME                PNAME                     PVAL1 PVAL2
    -------------------- -------------------- ---------- --------------------
    SYSSTATS_INFO        STATUS                          COMPLETED
    SYSSTATS_INFO        DSTART                          01-14-2010 21:05
    SYSSTATS_INFO        DSTOP                           01-14-2010 21:05
    SYSSTATS_INFO        FLAGS                         1
    SYSSTATS_MAIN        CPUSPEEDNW             1247,559
    SYSSTATS_MAIN        IOSEEKTIM                 5,053
    SYSSTATS_MAIN        IOTFRSPEED            45469,627
    SYSSTATS_MAIN        SREADTIM                  2,583
    SYSSTATS_MAIN        MREADTIM                  1,851
    SYSSTATS_MAIN        CPUSPEED                   1329
    SYSSTATS_MAIN        MBRC                         14
    
    SNAME                PNAME                     PVAL1 PVAL2
    -------------------- -------------------- ---------- --------------------
    SYSSTATS_MAIN        MAXTHR                174532608
    SYSSTATS_MAIN        SLAVETHR                  48128
    If you think I missed something important in this post sample made me know, please.

    Kind regards
    Marek

    To update all the records in the table to 700K, one of the fastest ways would be to recreate a new table:
    CREATE TABLE PSI_NEW AS SELECT psi.*, min (eve.dateve)
    FROM Eve, lb/po2, evp
    where
    Eve.codsoc = evp.codsoc and eve.achvte = evp.achvte and eve.typeve = evp.typeve and eve.numeve = evp.numeve
    and eve.codsoc = psi.num_mag and eve.achvte = 'V' and eve.typeve in('TIC','FAV')
    and eve.dateve ' 20090101 ', ' 20091231' and evp.codpro = psi.ref_pro

    Another technique that can work well is using the merge command:
    MERGE INTO PSI has (select min (eve.dateve) as min_dat, evp.codpro as codpro help
    Since the day before, evp
    where eve.codsoc = evp.codsoc and eve.achvte = evp.achvte and eve.typeve = evp.typeve and eve.numeve = evp.numeve
    and eve.codsoc = psi.num_mag and eve.achvte = 'V' and eve.typeve in('TIC','FAV')
    and eve.dateve between '20090101' and '20091231'
    GROUP BY evp.codpro) b ON (a.ref_pro = b.codpro)
    WHEN MATCHED, THEN update SET PREMIERE_VENTE = B.min_dat

    The advantage of the two modes is that you don't have any subquery launched K 700 times.

    Published by: B.Guillaumin on January 15, 2010 18:00

    Published by: B.Guillaumin on January 15, 2010 18:27

  • Update with the Lead feature and several lines

    I have a table such as:

    Table1:

    OrderNumber EFFECTIVE_DATE EFFECTIVE_END_DATE FileName

    123 11/5/2015-12/31/2099 File5.txt

    123, 7/11/2015-12/31/2099 File7.txt

    or it can look like:

    Table2

    OrderNumber EFFECTIVE_DATE EFFECTIVE_END_DATE FileName

    123 11/5/2015-11/7/2015 File5.txt

    123, 7/11/2015-11/9/2015 File7.txt

    123 11/9/2015-12/31/2099 File9.txt

    123 11/15/2015-12/31/2099 File15.txt

    I want to take the 2nd to the last EndDate and update with the previous value.

    So in fact, it would look like this.

    Table1:

    OrderNumber EFFECTIVE_DATE EFFECTIVE_END_DATE FileName

    123 11/5/2015-11/7/2015 File5.txt

    123, 7/11/2015-12/31/2099 File7.txt

    or

    Table2

    OrderNumber EFFECTIVE_DATE EndDate FileName

    123 11/5/2015-11/7/2015 File5.txt

    123, 7/11/2015-11/9/2015 File7.txt

    123-11/9/11/15 to 2015/2015 File9.txt

    123 11/15/2015-12/31/2099 File15.txt

    I got it work in a select statement to a single value. now I just need help it enter an UPDATE statement and update all records.

    SELECT W.EFFECTIVE_DATE, W.EFFECTIVE_END_DATE,

    NVL (LEAD (W.EFFECTIVE_DATE, 1) (ORDER implementation W.EFFECTIVE_DATE), December 31, 99 ') AS 'EFFECTIVE_DATE_NEW '.

    OF WH_ORDERS_REPORT W

    WHERE ORDERNUMBER = '10460992';

    It did not work:

    UPDATE WH_ORDERS_REPORT WH

    SET EFFECTIVE_END_DATE = (SELECT NVL (LEAD (WH2. EFFECTIVE_DATE, 1) (ORDER of WH2. (EFFECTIVE_DATE), DECEMBER 31, 99 ')

    OF WH_ORDERS_REPORT WH2

    WHERE WH. ORDERNUMBER = WH2. ORDERNUMBER)

    I appreciate your help in the creation of an update statement to do this.

    Rap, but it's working now.  I'll confirm with a few other records before I mark as correct, but what I see so far, it is beautiful, thank you!

    merge into WH_LIFELINE_ORDERS_REPORT D

    a_l'_aide_de)

    Select

    DISTINCT ORDERNUMBER,

    CURRENTSTATUSDATETIME,

    NVL (LEAD(EFFECTIVE_DATE, 1) ON (ORDERNUMBER partition

    (EFFECTIVE_DATE order), December 31, 99 ') as EFFECTIVE_END_DATE

    of WH_LIFELINE_ORDERS_REPORT

    ) S

    WE (D.ORDERNUMBER = S.ORDERNUMBER

    AND D.CURRENTSTATUSDATETIME = S.CURRENTSTATUSDATETIME

    )

    When matched then

    setting a day of set D.EFFECTIVE_END_DATE = S.EFFECTIVE_END_DATE;

  • How do I remove high-low lines with VID HD in first elements 7?

    Problem: Every time I have shoot original sequences in camera and import video in first, there are lines up/down, unless I develop the video that will ruin the quality of original shooting.

    Camera:  I use a Sony 10.2 mega pixels HD AVCHD, taken from view in 1080I/480I - HD - 16:9

    Aim: I would like to edit my videos without expanding (ruining) of original sequences where my final videos are produced without high-low lines on the you tube videos.

    HELP: How can I solve this problem, either my camera or settings or something else that I need.  Your help is appreciated!

    It seems, from your other post, you understand that you use the correct project for your video and audio settings. This should help you 95% of the way.

    Then, when you export your video by using the share/Personal Computer / MOV, use one of the default presets. Usually, this will give you a version non-Letterbox your video. Also, take a look at the FAQ to the right of the forum.

    http://forums.Adobe.com/thread/390608?TSTART=0

    But remember also that YouTube has its own action in progress, and it could well be ondoing everything you do right. The best you can do is do your best - and hope YouTube is not screw it up too bad of re - encode.

  • Update with INNER JOIN

    Hello

    My update with the inner join does not seem to work.

    UPDATE RECAP R SET R.FLAVOR = (SELECT FN. FLAVOR_NDC FN FLAVOR, REPLACE CAP R WHERE R.NDC11 = FN. NDC11)

    When I write the query above, the inner circle question (SELECT FN. FLAVOR_NDC FN FLAVOR, REPLACE CAP R WHERE R.NDC11 = FN. NDC11) returns multiple lines, and it's a new syntax for me (as I was Teradata and SQL server).

    Can you please how this request can be written to make it work?

    I get the error message below

    SQL error: ORA-01427: einreihig subquery returns multiple rows
    01427 00000 - "einreihig subquery returns several lines.

    1. fix your code:

    UPDATE RECAP R SET R.FLAVOR = (SELECT FN.FLAVOR FROM FLAVOR_NDC FN WHERE R.NDC11 = FN.NDC11)
    

    2. you can use the fusion

    merge into RECAP R
    using FLAVOR_NDC FN
    on(R.NDC11 = FN.NDC11)
    when matched then
         update
         set R.FLAVOR = FN.FLAVOR
    

    Kind regards
    Malakshinov Sayan

  • Had to do a restoration complete my xp machine and will not update, in the past, system automatically updated with cartridges of siema etc service?

    Had to do a restoration complete my xp machine and will not update, in the past, system automatically updated with cartridges of siema etc service?

    What is happening, it is that it is so more the possibility of a user friendly hands on automatic update of Windows XP from a clean install.  Windows Update will NOT synchronize with and updated in the current order status to update a machine with a clean install of XP, but you separately download some patches and intermediate updates and apply them manually, to have a machine that connects a bit normally with Windows Update.

    Install the last update cumulative security for the version of Internet Explorer you have currently is essential, and you need to download separately and install it before going any further.

    http://support.Microsoft.com/kb/2888505

    Scroll to the information file for XP and Server 2003

    Download the file corresponding to your version of Internet Explorer and install first.

    It is also highly recommended that you install Firefox because IE8 is limited, probably compromised and sometimes useless and will crash on many sites, including Microsoft sites, including linked just above.

  • P2715Q updated with STD

    Hi I have a Surface Pro 3 (i7, 8 GB model) with docking station and it is connected through mini-DP DP to the first P2715Q monitor then Garland DP to DP for the second P2715Q. The two monitors present at 3840 x 2160, 30 Hz instead of 60 Hz maximum. There is no option in the parameter to set the above 30 Hz to display Windows Update.

    I loaded all updates firmware for Surface Pro 3 including that published on 16-01-14

    This is a limitation of the TMS?

    This is a limitation of the specification 1.2 DP for a bandwidth which is 17.28 Gbps in High Bit Rate 2 (HBR2) mode.

    One of these GPP of 3840 x 2160 × 24 @ 60 Hz flow requires 12.54Gbit / s.  Reduce by half to 30 Hz refresh rate makes the same b/w as just 1 flow of 60 Hz.

  • BlackBerry 10 did I brick my BB Q10? I've updated with Knowyou 10.2.2.932

    I have my BB Q10 brick? I've updated with Knowyou 10.2.2.932. After the reboot, I can not make or receive calls and all I get is: "the 'cell' phone line is not available. Choose a different phone line and try your call again""another phone line? really! O_o NB! Only software I use and I are Knowyou because it works with Linux.

    I reinstalled the 10.2.2.932, because I had nothing to lose and guess what, it worked. I can make calls, and everything works as expected. I must be imagining things, but I think that the responsiveness of the user interface has changed a bit. It feels like I have to hold the buttons etc, in the user interface, for a little more time so that he could respond. Not sure, I've got it more or less please. It's just different. Waiting for 10.3

Maybe you are looking for

  • Sluggish after reinstalling OS

    So I had to reinstall Win10, it a new install with Firefox and a new profile (I imported bookmarks). And now everything is slow. Videos and .gif are fine, but the user interface is trolling. If I open and close tabs, I can clearly see stutter them, b

  • password management 'key' icon does not appear on a toolbar

    I can manage the passwords using tools-> Options, BUT the small icon 'key', indicated in the instructions, is not visible anywhere on my toolbars. (I have ALL the toolbars displayed.)

  • Screen sharing causes Skype to crash

    Hello Whenever my colleague attempts to share their screen with me, Skype crashes. There is no problem in sharing my screen with him. I tried to remove the program and reinstall - it worked the first time thereafter, but today it happened again. Can

  • I can't log into Windows on Satellite L300-1BW

    When I try to log on my L300-1bw I get the user name appear but when I enter the password (for the administrator) password is not accepted.(The username and password have been defined when the laptop was first pulled up and it was closed and restarte

  • Why C:\WINDOWS\system32\cmd.exe load on start up? I have to close it until I can do anything

    %SystemRoot%\system32\cmd.exe C:\Windows\System32 Here's what appears and I don't know why it is, and I don't know how to prevent. I've just close it. Copyright (C) 1985-2001 Microsoft Corp.Microsoft Windows XP [Version 5.1.2600]Copyright (C) 1985-20