Re: Create Schema

  • From: Paresh Yadav <yparesh@xxxxxxxxx>
  • To: fuzzy.graybeard@xxxxxxxxx
  • Date: Fri, 8 Nov 2013 13:58:55 -0500

I agree with Hans, please think/explain why you want to do this. In the
meanwhile try

deferred_segment_creation

Use this clause to determine when the database should create the segment(s)
for this table:

   -

   SEGMENT CREATION DEFERRED: This clause defers creation of the table
   segment — as well as segments for any LOB columns of the table, any indexes
   created implicitly as part of table creation, and any indexes subsequently
   explicitly created on the table — until the first row of data is inserted
   into the table. At that time, the segments for the table, LOB columns and
   indexes, and explicitly created indexes are all materialized and inherit
   any storage properties specified in this CREATE TABLEstatement or, in
   the case of explicitly created indexes, the CREATE INDEX statement.
   These segments are created regardless whether the initial insert operation
   is uncommitted or rolled back. This is the default value.

   Caution:
   When creating many tables with deferred segment creation, ensure that
   you allocate enough space for your database so that when the first rows are
   inserted, there is enough space for all the new segments.
   -

   SEGMENT CREATION IMMEDIATE: The table segment is created as part of this
   CREATE TABLE statement.

Immediate segment creation is useful, for example, if your application
depends upon the object appearing in the DBA_, USER_, and ALL_SEGMENTS data
dictionary views, because the object will not appear in those views until
the segment is created. This clause overrides the setting of the
DEFERRED_SEGMENT_CREATION initialization parameter.

To determine whether a segment has been created for an existing table or
its LOB columns or indexes, query the SEGMENT_CREATED column of USER_TABLES,
USER_INDEXES, or USER_LOBS.

Thanks
Paresh
416-688-1003



On Fri, Nov 8, 2013 at 9:07 AM, Hans Forbrich <fuzzy.graybeard@xxxxxxxxx>wrote:

> Why?  How often does it change?  What are the business reasons around
> this?  What connectivity?  What version of database?  Is seed data to be
> included?   Is this for training or production? etc. etc. etc.
>
> There are several ways that might work, including transportable tablespace
> (which is how Oracle distributes and includes the sample database schemas),
> deferring segment creation, data pump import, external tables using data
> pump, DBLink, Pluggabe container DBs.
>
> You don't describe much about how you are doing this now to achieve your
> (rather good 12 minutes), so t's hard to make suggestions.
>
> /Hans
>
>
> On 07/11/2013 10:41 PM, Raju Angani wrote:
>
>> I was wondering, if there's a way to speed-up the schema creation (say 2
>> minutes).
>>
> --
> //www.freelists.org/webpage/oracle-l
>
>
>

Other related posts: