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: Questions on extents, etc.

Re: Questions on extents, etc.

From: Brian Peasland <peasland_at_edcmail.cr.usgs.gov>
Date: 2000/04/20
Message-ID: <38FEFFB9.4534C47@edcmail.cr.usgs.gov>#1/1

Comments inline.

> If I use this statement to create a tablespace:
>
> Create tablespace ROLLBACK_TBS
> DATAFILE '/rollback/somefile.dbf'
> SIZE 25M
> DEFAULT STORAGE
> (
> INITIAL 160K
> NEXT 160K
> PCTINCREASE 0
> MINEXTENTS 2
> MAXEXTENTS 100
> )
>
> and then 3 rollback segments with this statement:
>
> Create ROLLBACK SEGMENT roll1_rbs
> (roll2_rbs, roll3_rbs)
> TABLESPACE ROLLBACK_TBS
> STORAGE
> (
> INITIAL 160K
> NEXT 160K
> MINEXTENTS 2
> MAXEXTENTS 30
> )
>
> I'm wondering:
> - is the whole tablespace being used, or, am I limiting
> its use to 16 megs (160k * 100 = 16000K = 16M) ?
> If so, can we ensure all the 25M is used by just leaving
> out the MAXEXTENTS clause?

The tablespace is limited to a maximum of 25M of space. This is because you defined it in the SIZE parameter. If you create an object in the tablespace and you do not provide any storage parameters, then the defaults will be used. This means that a CREATE TABLE statement (or the like) without storage parameters will start off with two initial extents of 160K each, up to a maximum of 100 extents.

> - is any transaction using this tablespace/rollback segment
> now limited to 4800K (160K * 30 = 4800K = 4.8M) total rollback
> resource? One big transaction can only use one rollback
> segment, correct?

Correct on both accounts.

> - can I create 10 rollback segments, in the same manner,
> all using the same tablespace, or will that cause an error?
> (10 * 4.8M = 48M. Larger than 25M.)

If you create 10 rollback segments in the same manner described above, then you will have 10 segments that initially have 160k*2 minextents = 320k of space per segment. 320k per segment * 10 segments = 3200k = 3.2M which is less than the 25M you have. So all rollback segments will be created just fine. When transactions start using the rollback segments and the rollback segment needs to increase, you may run out of room in the tablespace. I always have the tablespace for my rollback segments big enough to hold all rollback segments at maxextents. In your case, if you want 10 rollback segments, make sure you tablespace is at least 48M.

> - if a transaction runs out of extents, could I just increase
> the rollback segment's MAXEXTENTS to say, 100? Would this
> conflict with the other rollback segments?

If a transaction runs out of extents, it will abort. An ORA error will be generated. You'll have to increase the rollback segment's maxextents parameter before the transaction reaches the end. The only conflict with other rollback segments would occur if the tablespace ran out of space for everything.  

> - while not a good idea to just give the UNLIMITED clause
> for rollback segments, if it was given, does the rollback
> segment grow until the tablespace reaches 25M? Or, until the
> disk is full?

If maxextents = unlimited, then yes, the rollback segment will grow until the tablespace is full, not the disk.  

HTH,
Brian

-- 
========================================
Brian Peasland
Raytheons Systems at
  USGS EROS Data Center
These opinions are my own and do not
necessarily reflect the opinions of my 
company!
========================================
Received on Thu Apr 20 2000 - 00:00:00 CDT

Original text of this message

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