0 rows returned for DML - redo generated?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: 0 rows returned for DML - redo generated?

  1. #1
    Join Date
    Dec 2001
    Location
    Keene, NH
    Posts
    510
    If a DML statement is executed and it returns 0 rows is there redo generated? I would think not because there is nothing to roll forward in a recovery. I need confirmation.

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,448
    is this an academic question? you can try this yourself easily, just turn autotrace on

  3. #3
    Join Date
    Dec 2001
    Location
    Keene, NH
    Posts
    510
    Originally posted by pando
    is this an academic question?
    I guess you can call it that - A VEEP asked this question in a meeting . I wasn't certain so I asked here in this forum.

    I took your advice and got my (and the VEEP's ) answer.

    Thanks!

  4. #4
    Join Date
    May 2002
    Posts
    2,645
    And the answer is...?

  5. #5
    Join Date
    Dec 2001
    Location
    Keene, NH
    Posts
    510

    Thumbs up

    ...and the answer is NO... it does NOT create redo (notice the redo size below)

    SQL> set autotrace on
    SQL> delete pallet where 1 = 2 ;

    0 rows deleted.

    Execution Plan
    ----------------------------------------------------------
    0 DELETE STATEMENT Optimizer=CHOOSE (Cost=108 Card=9927 Bytes= 307737)

    1 0 DELETE OF 'PALLET'
    2 1 FILTER
    3 2 TABLE ACCESS (FULL) OF 'PALLET' (Cost=108 Card=9927 By tes=307737)

    Statistics
    ----------------------------------------------------------
    0 recursive calls
    0 db block gets
    0 consistent gets
    0 physical reads
    0 redo size
    457 bytes sent via SQL*Net to client
    335 bytes received via SQL*Net from client
    3 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    0 rows processed

    SQL>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width