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

Home -> Community -> Usenet -> c.d.o.tools -> PK Constraint tablespace usage question

PK Constraint tablespace usage question

From: <gmei_at_my-deja.com>
Date: 2000/01/31
Message-ID: <874ner$dp$1@nnrp1.deja.com>#1/1

Hi:

I am trying to understand how space is allocated when PK constraint does not specify tablespace name in “create table …” script.

I tried two different scripts:

  1. CREATE TABLE HpxAccessPrivilegeDef( AccessPrivilegeID NUMBER(9, 0) NOT NULL, AccessLevel NUMBER(2, 0) NOT NULL, Name VARCHAR2(30) NOT NULL, Description VARCHAR2(255), Active CHAR(1) NOT NULL, CONSTRAINT PKHpxAccessPrivilegeDef PRIMARY KEY (AccessPrivilegeID) USING INDEX TABLESPACE INDX STORAGE(INITIAL 50K NEXT 25K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0 )
    )
    TABLESPACE DATA STORAGE(INITIAL 50K NEXT 25K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0 );

This works fine and small disk spaces have been allocated in tablespace DATA and tablespace INDX.

2. CREATE TABLE HpxAccessPrivilegeDef(

    AccessPrivilegeID    NUMBER(9, 0)     NOT NULL,
    AccessLevel          NUMBER(2, 0)     NOT NULL,
    Name                 VARCHAR2(30)     NOT NULL,
    Description          VARCHAR2(255),
    Active               CHAR(1)          NOT NULL,
    CONSTRAINT PKHpxAccessPrivilegeDef PRIMARY KEY (AccessPrivilegeID)
)

TABLESPACE DATA
STORAGE(INITIAL 50K
        NEXT 25K
        MINEXTENTS 1
        MAXEXTENTS UNLIMITED
        PCTINCREASE 0
        );

This script also run fine. But without specifying tablespace for PK constraint, a “big” chunk of disk space in tablespace DATA has been allocated. My question is why? I thought oracle only allocate the initial extent. Maybe this is not true in PK constraint?

Thanks for your help.

Guang

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Jan 31 2000 - 00:00:00 CST

Original text of this message

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