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: Newbie:Creating Tablespace

Re: Newbie:Creating Tablespace

From: <markp7832_at_my-deja.com>
Date: Tue, 28 Dec 1999 01:07:54 GMT
Message-ID: <849259$g6$1@nnrp1.deja.com>


In article <8490nh$vcs$1_at_nnrp1.deja.com>,   markp7832_at_my-deja.com wrote:
> In article <847bnl$r9d$1_at_nnrp1.deja.com>,
> sboucher_at_msn.com wrote:
> > I am a little uncertain how tablespace works. I have several flat
> > ascii files amounting to 300MB I will be loading into various tables
> > with SQL loader.
> >
> > Do I create a tablespace first with a size of 300MB. How is
database
> > growth handled.
> >
> > Thanks
> > Scott
> >
> In Oracle a tablespace is a logical entity that is used to collect one
> or more physical OS data files together to support the storage of
> logical objects like tables and indexes.
>
> Every table is associated with a tablespace either by use of the
> tablespace clause or by default to the users default tablespace. So
by
> assigning a table to a tablespace Oracle normally handles the
assigning
> of tables to Os files.
>
> You can find documentation for this in the Concepts Manual and in the
> SQL manual under Create Table and Create User.
>

I forgot to say anything about space management which is part of what you asked so here goes.

When you create a tablespace you can give it a set of default storage storage parameters that are used for all objects assigned to the tablespace that do not specifiy storage parameters. Oracle provides defaults for these storage parameters if you do not specify them. Namely an extent will be 5 Oracle blocks and an object will be allowed to take a maximum number of extents that is dependent on the database block size. The size of each additional extent request will be increased base on the pctincrease storage parameter.

Basically: Oracle does I/O in the Oracle database blocksize, A set of Oracle blocks makes up an extent, and storage is allowed in extents. The number of blocks in an extent depends on the storage parameters.

See the 'storage clause' in the SQL manual. The Concepts manual has a concise but very understandable section on blocks ==> extents ==> segments.

storage (

initial      size reserved at object allocation
next         size of 1st next extent request
minextents default is 1 but can be multiple maxextents object is limited to using no more than this number pctincrease increase each extent after 2nd by 1 + this percent  )

You will probably need to allocate space via tablespace to hold each table you plan to load plus indexes on those tables. --
Mark D. Powell -- The only advice that counts is the advice that  you follow so follow your own advice --

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Dec 27 1999 - 19:07:54 CST

Original text of this message

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