Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Zero redo generated for the first insert in a transaction...?

Rajesh CNov 19 2009 — edited Nov 22 2009
Hi,


I posted this question in the otn sql/ pl/sql forums but could not get any answers.
One user was able to reproduce it but he felt this was a bug.

I am trying to see the amount of redo generated by different insert statements.
I see that for the first insert in the transaction , the redo size is being shown as zero.
The very next insert generates a redo of 2664 bytes (probably for the last two inserts).
All subsequent inserts generate the expected number of redo.


The database I am using is 10.2.0.4
create table temp (
  x int, y char(1000), z date);

Table created.

set autotrace traceonly statistics;

sql> insert into temp values (1, user, sysdate );

1 row created.


Statistics
----------------------------------------------------------
          1  recursive calls
          5  db block gets
          1  consistent gets
          0  physical reads
          0  redo size
        358  bytes sent via SQL*Net to client
        319  bytes received via SQL*Net from client
          3  SQL*Net roundtrips to/from client
          1  sorts (memory)
          0  sorts (disk)
          1  rows processed
--Showing only redo size for subsequent inserts...
sql> insert into temp values (2, user, sysdate);

1 row created.


Statistics
------------
2664  redo size

sql> insert into temp values (3, user, sysdate);

1 row created.


Statistics
----------------------------------------------------------
1300  redo size

sql> insert into temp values (4, user, sysdate);

1 row created.


Statistics
----------------------------------------------------------
1368  redo size
Can someone please explain why this happens?

Thanks,
Rajesh.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 20 2009
Added on Nov 19 2009
12 comments
1,918 views