Return-Path: <ml-errors@fatcity.com>
Received: from ensim.rackshack.net (root@localhost)
 by orafaq.net (8.11.6/8.11.6) with ESMTP id h9N7i7W03921
 for <oracle-l@orafaq.net>; Thu, 23 Oct 2003 02:44:07 -0500
X-ClientAddr: 66.27.56.213
Received: from www2.fatcity.com (rrcs-west-66-27-56-213.biz.rr.com [66.27.56.213])
 by ensim.rackshack.net (8.11.6/8.11.6) with ESMTP id h9N7hwc03914
 for <oracle-l@orafaq.net>; Thu, 23 Oct 2003 02:43:59 -0500
Received: (from root@localhost)
 by www2.fatcity.com (8.11.6/8.11.6) id h9N4uDH15623
 for oracle-l@orafaq.net; Wed, 22 Oct 2003 21:56:13 -0700
Received: by fatcity.com (05-Jun-2003/v1.0g-b73/bab) via fatcity.com id 005D4023; Wed, 22 Oct 2003 21:39:25 -0800
Message-ID: <F001.005D4023.20031022213925@fatcity.com>
Date: Wed, 22 Oct 2003 21:39:25 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: Mladen Gogala <mgogala@adelphia.net>
Sender: ml-errors@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: Mladen Gogala <mgogala@adelphia.net>
Subject: Re: questions regarding nologging
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 73; ListGuru (c) 1996-2003 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: text/plain; Format=Flowed; DelSp=Yes; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Well, Rafiq, when you move the table, indexes are marked stale, which means
that you must rebuild them. Marking indexes unusable shouldn't generate any  
redo log, except for the dictionary block that was altered. Other then that,  
moving table is an opration roughly analogous to CTAS and I suspect that if  
the target table is NOLOGGING, that the whole operation is done in the  
"direct" fashion, with block prebuild and appended below the high watermark. I  
tried it and I didn't see any redo log  generation either. That is probably  
the reason why splitting partitions also doesn't generate redo, as Arup has  
noted.  Oracle has highly optimized many of these operations and avoding
excessive redo log generarion is one of the best optimizations one can make.

On 2003.10.22 23:54, M Rafiq wrote:
> Waleed,
> I agree with you as I moved a 5GB table last week with nologging option with  
> extent size 500M and did not see any normal redo generation for that. It is  
> 8.1.7.0 database. that table has 8 indexes for total size of almost 3GB.
> 
> Regards
> Rafiq
> 
> 
> 
> 
> Reply-To: ORACLE-L@fatcity.com
> To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
> Date: Wed, 22 Oct 2003 17:14:24 -0800
> 
> Alter table ...Move TS nologging....
> is 100% equivalent to CTAS and should generate minimal amount of logging
> even if it ran serially (no PQ).
> 
> Actually the type of command is considered "CREATE TABLE"
> 
> So I'm not sure how the original poster was able to determine that the
> operation generated huge redo logs!
> 
> This could be possible if the redo logs has to do with Extents management
> and the needed RBS to manage it (specially if the extents are very small and
> the TS is dictionary based).
> 
> Waleed
> 
> -----Original Message-----
> Sent: Wednesday, October 22, 2003 4:54 PM
> To: Multiple recipients of list ORACLE-L
> 
> 
> That's because nologging attribute  only affects the "direct"
> operations, i.e. the the operations that prebuild blocks and add
> them below the flood watermark. That includes sqlloader with direct=y,
> inserts with /*+ append */ hint and CTAS. Normal SQL based operations
> are not affected.
> 
> On 10/22/2003 04:39:34 PM, Roger Xu wrote:
> > > Hi Gurus,
> > >
> > > I have a couple of questions regarding "nologging".
> > >
> > > 1) alter table tabname move tablespace tbsname nologging;
> > >
> > >    How come this sql still generated same amount of redo logs equal
> > to the size of the table?
> > >
> > > 2) alter index idxname rebuild tablespace tbsname nologging;
> > >
> > >    This sql only generate minimum redo logs.
> > >    But the index ends up LOGGING=NO in dba_indexes view.
> > >    How do I turn the logging on for this index?
> > >
> > > Thanks,
> > >
> > > Roger Xu
> > > Database Administrator
> > > Dr Pepper Bottling Company of Texas
> > > (972)721-8337
> > >
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.net
> > --
> > Author: Roger Xu
> >   INET: roger_xu@dp7uptx.com
> >
> > Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
> > San Diego, California        -- Mailing list and web hosting services
> > ---------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from).  You may
> > also send the HELP command for other information (like subscribing).
> >
> 
> Mladen Gogala
> Oracle DBA
> 
> 
> 
> Note:
> This message is for the named person's use only.  It may contain
> confidential, proprietary or legally privileged information.  No
> confidentiality or privilege is waived or lost by any mistransmission.  If
> you receive this message in error, please immediately delete it and all
> copies of it from your system, destroy any hard copies of it and notify the
> sender.  You must not, directly or indirectly, use, disclose, distribute,
> print, or copy any part of this message if you are not the intended
> recipient. Wang Trading LLC and any of its subsidiaries each reserve the
> right to monitor all e-mail communications through its networks.
> Any views expressed in this message are those of the individual sender,
> except where the message states otherwise and the sender is authorized to
> state them to be the views of any such entity.
> 
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Mladen Gogala
>   INET: mladen@wangtrading.com
> 
> Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
> San Diego, California        -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Khedr, Waleed
>   INET: Waleed.Khedr@FMR.COM
> 
> Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
> San Diego, California        -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
> 
> _________________________________________________________________
> Concerned that messages may bounce because your Hotmail account has exceeded  
> its 2MB storage limit? Get Hotmail Extra Storage!          
> http://join.msn.com/?PAGE=features/es
> 
>-- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
>-- 
> Author: M Rafiq
>  INET: rafiq9857@hotmail.com
> 
> Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
> San Diego, California        -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
-- 
Mladen Gogala
Oracle DBA
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Mladen Gogala
  INET: mgogala@adelphia.net

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

