Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: NOLOGGING

RE: NOLOGGING

From: Gaja Krishna Vaidyanatha <oraperfman_at_yahoo.com>
Date: Mon, 25 Jun 2001 18:02:37 -0700
Message-ID: <F001.00337841.20010625181027@fatcity.com>


Ramon,

That is not true. Setting NOLOGGING at the object level only reduces the amount of redo generated for bulk INSERT operations with the /*+ APPEND */ hint, certain partition administration operations and of course during the creation of the object itself. It does not eliminate generation of redo during a delete operation.

Attached is a sample output from a couple of delete commands, one with LOGGING and the other with NOLOGGING: Cheers,

Gaja


Gaja Krishna Vaidyanatha
Director, Storage Management Products,
Quest Software, Inc.
Co-author - Oracle Performance Tuning 101

Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/

SQL> select table_name, logging from user_tables;

TABLE_NAME                     LOG                                              
------------------------------ ---                                              
IDX_OBJ                        YES                                              
IOX_EXPLAIN                    YES                                              
MY_TAB                                                                          
PLAN_TABLE                     YES                                              
PROD_OBJECTS                   YES                                              
TEST_OBJECTS                   YES                                              
TEST_TAB                       YES                                              

7 rows selected.

SQL> set autotrace traceonly
SQL> delete from test_objects where rownum < 11;

10 rows deleted.

Execution Plan


   0      DELETE STATEMENT Optimizer=CHOOSE (Cost=540 Card=306828 Byte          
          s=920484)                                                             
                                                                                
   1    0   DELETE OF 'TEST_OBJECTS'                                            
   2    1     COUNT (STOPKEY)                                                   
   3    2       TABLE ACCESS (FULL) OF 'TEST_OBJECTS' (Cost=540 Card=3          
          06828 Bytes=920484)                                                   
                                                                                

Statistics
----------------------------------------------------------                      
        243  recursive calls                                                    
         48  db block gets                                                      
         37  consistent gets                                                    
         22  physical reads                                                     
       5704  redo size                                                          
        850  bytes sent via SQL*Net to client                                   
        568  bytes received via SQL*Net from client                             
          3  SQL*Net roundtrips to/from client                                  
          7  sorts (memory)                                                     
          0  sorts (disk)                                                       
         10  rows processed                                                     

SQL> alter table test_objects nologging;

Table altered.

SQL> rollback;

Rollback complete.

SQL> select table_name, logging from user_tables;

TABLE_NAME                     LOG                                              
------------------------------ ---                                              
IDX_OBJ                        YES                                              
IOX_EXPLAIN                    YES                                              
MY_TAB                                                                          
PLAN_TABLE                     YES                                              
PROD_OBJECTS                   YES                                              
TEST_OBJECTS                   NO                                               
TEST_TAB                       YES                                              

7 rows selected.

SQL> delete from test_objects where rownum < 11;

10 rows deleted.

Execution Plan


   0      DELETE STATEMENT Optimizer=CHOOSE (Cost=540 Card=306828 Byte          
          s=920484)                                                             
                                                                                
   1    0   DELETE OF 'TEST_OBJECTS'                                            
   2    1     COUNT (STOPKEY)                                                   
   3    2       TABLE ACCESS (FULL) OF 'TEST_OBJECTS' (Cost=540 Card=3          
          06828 Bytes=920484)                                                   
                                                                                

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

SQL> set autotrace off

SQL> spool off Received on Mon Jun 25 2001 - 20:02:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US