Re: Rebuild table

  • From: Greg Rahn <greg@xxxxxxxxxxxxxxxxxx>
  • To: joe_dba@xxxxxxxxxxx
  • Date: Tue, 21 Jun 2011 13:29:27 -0700

create table <whatever> nologging as select * from <table>;

If possible, it would have been much better to keep the rows you wanted via
a CTAS and then drop the original and rename.  Could have saved you all that
redo.

When it comes to bulk modifications, DELETE should be at the end of your
options, not the beginning.

On Tue, Jun 21, 2011 at 1:19 PM, Joe Smith <joe_dba@xxxxxxxxxxx> wrote:

>
> I have a table that had 16 million records in it.  I deleted rows out of it
> until I had only 6k rows.  But I still have 57k blocks  (8k size).
>
> What is the best way to rebuild the table?  The table is varchar2 and
> number datatypes.
>
>

-- 
Regards,
Greg Rahn
http://structureddata.org

Other related posts: