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

Home -> Community -> Usenet -> c.d.o.server -> Re: Re-import Question

Re: Re-import Question

From: joel garry <joel-garry_at_home.com>
Date: 23 Oct 2006 14:16:27 -0700
Message-ID: <1161638187.028997.54540@h48g2000cwc.googlegroups.com>

klabu wrote:
> I need to RE-import set of tables/data from Prod schema into my
> schema....(why = get fresh data)
>
> Should I truncate or drop cascade the current (stale) set ?
>
> thanks
> --
> 10gR2

Depends. Truncate should theoretically be better, by not having to reallocate storage, but it seems to have a few obscure strangenesses that can cause some consternation. For example, there is a rule I haven't seen documented anywhere, but has been demonstrated, that segments must start on certain boundaries, so you can wind up running out of space when you think there is plenty. Creating fresh storage before or duing import avoids such problems. Also, if your normal processing is enlarging rows while updating (without causing row chaining), PCTFREE could make your storage requirements larger on recreation - unless you think about it and manipulate it carefully.

In addition, some software requires additional steps when attempting to import, so you keep things cleaner with the drop cascade. So that's my habit. I'm going through some pain right now as I have to re-add hundreds of triggers solely due to a schema name change. That used to work automagically in my configuration.

In the past, Oracle had a strong design bias towards adding (as opposed to updating and deleting) and also had issues with manipulating large amounts of segments (ie, with DMT's), so it made more of a difference. Nowadays it's more "try both and see which works better for your situation."

jg

--
@home.com is bogus.
Make money by trolling public records:
http://www.signonsandiego.com/uniontrib/20061020/news_1n20stolen.html
Received on Mon Oct 23 2006 - 16:16:27 CDT

Original text of this message

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