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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: TEMP Tablespace

Re: TEMP Tablespace

From: Nikunj Gupta <good_dba_at_hotmail.com>
Date: Fri, 1 Dec 2000 01:52:54 -0800
Message-Id: <10698.123477@fatcity.com>


This is a multi-part message in MIME format.

------=_NextPart_000_002A_01C05B39.6BF5ACA0 Content-Type: text/plain;

        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

RE: TEMP TablespaceHi Lisa,

I agree with Djordje.=20

But if you have already created TEMP tablespace with 16Gb as requried.. = and would not like to drop and recreate with all that is suggested...=20

It seems you have TEMP tablespace of the type PERMANENT, suggested and = preferred is TEMPORARY instead of PERMANENT. ( What does the LIST Guru's = say ? )

Now, there can be a workaround for your problem.. You can always.. = change the NEXT of TEMP tablespace..=20

Whenever TEMP tablespace is used.. NEXT extent is used for allocation =
and not INITIAL, whereas in all other tablespaces INITIAL is used for =
allocation.  (I hope that is why, it is told to have both Initial and =
Next of them of the same size).

One advantage you may have, as the TEMP tablespace is of the = PERMANENT... .. SMON will COALESCE freespaces and you will have bigger = chunks. which are free.. .. While if it is TEMPORARY then, the free = pieces are marked as free.. and ORACLE internally uses them.. but DOES = NOT release them and show them to be FREE. So, if you have used 90 % of your TEMP Tablespace with TEMPORARY.. you = will always see it as 90% used.. while if it of the type PERMANENT.. and = you have released 90 % of it.. while you are using only 10%, at some = point of time you will find that your tablespace is approx. 90% free.

In both the cases .. all the free pieces are being used and managed.

I am trying to explain.. be patient..... Is it confusing ??

Why I told you this is.. SIMPLE.. if you had smaller NEXT intially.. and = type TEMPORARY ..with 90 % of TS USED, even if you increase NEXT to be = big enough.. You will not be able to take advantage.. and will end up = getting error messages.. because the largest available chunk could be = maximum 10%.

Being PERMANENT.. just change the NEXT to a sufficiently big value.. = but take care it should be the same.. as told by Djordje ... = N*SORT_AREA_SIZE+DB_BLOCK_SIZE where N can be any number.. Once there = are enough big free pieces you may be able to create the index.

PCTINCREASE would be preferred to be ZERO (0) for temporary tablespace.=20

(Again, it is case to case basis)....

LIST Guru's please respond this with your suggestions / corrections = and experience...

HTH Nikunj

  Hi Djordje,=20

  Thanks for sending this to the list. The result is in db blocks, = isn't it?=20

  Lisa Rutland Koivu=20
  Oracle Database Administrator=20
  Qode.com=20
  4850 North State Road 7=20
  Suite G104=20
  Fort Lauderdale, FL 33319=20

  V: 954.484.3191, x174=20
  F: 954.484.2933=20
  C: 954.658.5849=20

  http://www.qode.com=20

  "The information contained herein does not express the opinion or = position of Qode.com and cannot be attributed to or made binding upon = Qode.com."

  -----Original Message-----=20
  From: djordjej [mailto:djordjej_at_home.com]=20   Sent: Wednesday, November 29, 2000 6:50 PM=20   To: Multiple recipients of list ORACLE-L=20   Subject: Re: TEMP Tablespace=20

  The size on INITIAL and NEXT for the TEMP tablespace should be the = same, and=20
  should be N*SORT_AREA_SIZE+DB_BLOCK_SIZE, and PCTINCRESE should be 0. = The N=20
  from above is usually 3 (to be able to accomodate three contents of = the sort=20
  memory area), but it depends on the average number of sort runs (merge =

  phases) in your sorts. So if you have huge sorts with a lot of sort = runs=20
  you would like to have N larger but if you have a large number of = sorts that=20
  run concurrently are each not that large, you would like to go with = larger=20
  number of smaller sort segments.=20

  The size of the average sort you can find from the query:=20

  select sum(fs.PHYBLKWRT)*p.value/s.value=20     from v$filestat fs=20

         , v$datafile f=20
         , v$tablespace t=20
         , v$parameter p=20
         , v$sysstat s=20
   where f.file# =3D fs.file#=20
     and f.ts# =3D t.ts#=20
     and t.name =3D 'TEMP'=20
     and p.name=3D'db_block_size'=20
     and s.name =3D 'sorts (disk)'=20

   group by p.value, s.value;=20

  HTH=20   Djordje=20

> Really, I didn't work with such a big temp tablespace, but=20
> I recommend you creating it as a temporary tablespace because oracle =

  behaves different for allocating sort extents at temporary = tablespaces.=20
> Good luck.=20

  >=20
  >=20
  >=20

> On Wed, 29 Nov 2000 07:30:32 -0800 "Charlie Mengler" =
<charliem_at_mwh.com>=20
  wrote:=20
> > Oracle V7.3.4.3 on Solaris V2.6=20
> >=20
> > The volume of data I'm required to support has just increased=20
  significantly.=20
> > I've been force to increase the size of TEMP to around 16GB to =
support=20
> > index creation on a new LARGE table. TEMP is/was configured as -=20
> >=20
> >=20
> > SQL> select * from dba_tablespaces where tablespace_name =3D =
'TEMP';=20
> >=20
> > TABLESPACE_NAME INITIAL_EXTENT NEXT_EXTENT =
MIN_EXTENTS=20
  MAX_EXTENTS PCT_INCREASE STATUS CONTENTS=20   >=20
> ------------------------------ -------------- ----------- =
----------- ----=20

> To REMOVE yourself from this mailing list, send an E-Mail message=20
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in=20
> the message BODY, include a line containing: UNSUB ORACLE-L=20
> (or the name of mailing list you want to be removed from). You may=20
> also send the HELP command for other information (like subscribing). =

  --=20
  Please see the official ORACLE-L FAQ: http://www.orafaq.com=20   --=20
  Author: djordjej=20
    INET: djordjej_at_home.com=20

  Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051=20   San Diego, California -- Public Internet access / Mailing Lists =

  --------------------------------------------------------------------=20
  To REMOVE yourself from this mailing list, send an E-Mail message=20   to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in=20   the message BODY, include a line containing: UNSUB ORACLE-L=20   (or the name of mailing list you want to be removed from). You may=20   also send the HELP command for other information (like subscribing).=20

------=_NextPart_000_002A_01C05B39.6BF5ACA0 Content-Type: text/html;

        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>RE: TEMP Tablespace</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi Lisa,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I agree with =
Djordje.&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>But if you have already created TEMP = tablespace=20
with 16Gb as requried.. and would not like to drop and recreate with all = that is=20
suggested... </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>It seems you have TEMP tablespace of = the type=20
PERMANENT, suggested and preferred is TEMPORARY instead of PERMANENT. ( = What=20
does the LIST Guru's say ? )</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Now, there can be a workaround for your =
problem..=20
You can always.. change the NEXT of TEMP tablespace.. </FONT></DIV> <DIV><FONT face=3DArial size=3D2>Whenever TEMP tablespace is used.. NEXT = extent is=20
used for allocation and not INITIAL, whereas in all other tablespaces = INITIAL is=20
used for allocation.&nbsp; </FONT><FONT face=3DArial size=3D2>(I hope = that is why,=20
it is told to have both Initial and Next of them of the same = size).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>One advantage you may have, as the TEMP = tablespace=20
is of the PERMANENT... .. SMON will COALESCE freespaces and you will = have bigger=20
chunks. which are free.. .. While if it is TEMPORARY then, the free = pieces are=20
marked as free.. and ORACLE internally uses them.. but DOES NOT release = them and=20
show them to be FREE.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>So, if you have used 90 % of your TEMP = Tablespace=20
with TEMPORARY.. you will always see it as 90% used.. while if it of the = type=20
PERMANENT.. and you have released 90 % of it.. while you are using only = 10%, at=20
some point of time you will find that your tablespace is approx. 90%=20
free.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>In both the cases .. all the free =
pieces are being=20
used and managed.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I am trying to explain..&nbsp; be =
patient..... Is=20

it confusing ??</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>Why I told you this is.. SIMPLE.. if = you had=20
smaller NEXT intially.. and type TEMPORARY ..with 90 % of = TS&nbsp;&nbsp;USED,=20
&nbsp;even if you increase NEXT to be big enough.. You will not be able = to take=20
advantage.. and will end up getting error messages.. </FONT><FONT = face=3DArial=20
size=3D2>because the largest available chunk could be maximum = 10%.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>Being PERMANENT..&nbsp; just change the = NEXT to a=20
sufficiently big value.. but take care it should be the same.. as told = by <FONT=20
face=3D"Times New Roman">Djordje ...&nbsp;&nbsp;=20 N*SORT_AREA_SIZE+DB_BLOCK_SIZE&nbsp; where N can be any number..&nbsp; = <FONT=20
face=3DArial>Once there are enough big free&nbsp;pieces you may be able = to create=20
the index.</FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT size=3D2>PCTINCREASE would be preferred to be ZERO (0) for = temporary=20
tablespace. </FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>(Again, it is case to case basis)....</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>LIST Guru's&nbsp; please respond this&nbsp;with your =

&nbsp;suggestions / corrections and experience...</FONT></DIV>

<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>HTH</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Nikunj</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20

style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">   <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>   <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20
  <A title=3Dlkoivu_at_qode.com href=3D"mailto:lkoivu_at_qode.com">Koivu, = Lisa</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A = title=3DORACLE-L_at_fatcity.com=20
  href=3D"mailto:ORACLE-L_at_fatcity.com">Multiple recipients of list = ORACLE-L</A>=20
  </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Thursday, November 30, = 2000 04:45=20
  AM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> RE: TEMP = Tablespace</DIV>
  <DIV><BR></DIV>
  <P><FONT size=3D2>Hi Djordje, </FONT></P>
  <P><FONT size=3D2>Thanks for sending this to the list.&nbsp; The =
result is in db=20
  blocks, isn't it? </FONT></P>
  <P><FONT size=3D2>Lisa Rutland Koivu</FONT> <BR><FONT size=3D2>Oracle = Database=20
  Administrator</FONT> <BR><FONT size=3D2>Qode.com</FONT> <BR><FONT = size=3D2>4850=20
  North State Road 7</FONT> <BR><FONT size=3D2>Suite G104</FONT> = <BR><FONT=20
  size=3D2>Fort Lauderdale, FL&nbsp; 33319</FONT> </P>   <P><FONT size=3D2>V: 954.484.3191, x174</FONT> <BR><FONT size=3D2>F: = 954.484.2933=20
  </FONT><BR><FONT size=3D2>C: 954.658.5849</FONT> <BR><FONT size=3D2><A =

  target=3D_blank =
href=3D"http://www.qode.com">http://www.qode.com</A></FONT> </P>   <P><FONT size=3D2>"The information contained herein does not express = the opinion=20
  or position of Qode.com and cannot be attributed to or made binding = upon=20
  Qode.com."</FONT></P><BR>
  <P><FONT size=3D2>-----Original Message-----</FONT> <BR><FONT = size=3D2>From:=20
  djordjej [<A=20
  href=3D"mailto:djordjej_at_home.com">mailto:djordjej_at_home.com</A>]</FONT> = <BR><FONT=20
  size=3D2>Sent: Wednesday, November 29, 2000 6:50 PM</FONT> <BR><FONT = size=3D2>To:=20
  Multiple recipients of list ORACLE-L</FONT> <BR><FONT = size=3D2>Subject: Re: TEMP=20
  Tablespace</FONT> </P><BR>
  <P><FONT size=3D2>The size on INITIAL and NEXT for the TEMP tablespace = should be=20
  the same, and</FONT> <BR><FONT size=3D2>should be=20   N*SORT_AREA_SIZE+DB_BLOCK_SIZE, and PCTINCRESE should be 0.&nbsp; The = N</FONT>=20
  <BR><FONT size=3D2>from above is usually 3 (to be able to accomodate = three=20
  contents of the sort</FONT> <BR><FONT size=3D2>memory area), but it = depends on=20
  the average number of sort runs (merge</FONT> <BR><FONT = size=3D2>phases) in your=20
  sorts.&nbsp; So if you have huge sorts with a lot of sort runs</FONT>=20   <BR><FONT size=3D2>you would like to have N larger but if you have a = large=20
  number of sorts that</FONT> <BR><FONT size=3D2>run concurrently are = each not=20
  that large, you would like to go with larger</FONT> <BR><FONT = size=3D2>number of=20
  smaller sort segments.</FONT> </P>

  <P><FONT size=3D2>The size of the average sort you can find from the=20
  query:</FONT> </P>
  <P><FONT size=3D2>select sum(fs.PHYBLKWRT)*p.value/s.value</FONT> =
<BR><FONT=20
  size=3D2>&nbsp; from v$filestat fs</FONT> <BR><FONT=20   size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , v$datafile f</FONT> = <BR><FONT=20
  size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , v$tablespace t</FONT> = <BR><FONT=20
  size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , v$parameter p</FONT> = <BR><FONT=20
  size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , v$sysstat s</FONT> = <BR><FONT=20
  size=3D2>&nbsp;where f.file# =3D fs.file#</FONT> <BR><FONT = size=3D2>&nbsp;&nbsp; and=20
  f.ts# =3D t.ts#</FONT> <BR><FONT size=3D2>&nbsp;&nbsp; and t.name =3D = 'TEMP'</FONT>=20
  <BR><FONT size=3D2>&nbsp;&nbsp; and p.name=3D'db_block_size'</FONT> = <BR><FONT=20
  size=3D2>&nbsp;&nbsp; and s.name =3D 'sorts (disk)'</FONT> <BR><FONT=20   size=3D2>&nbsp;group by p.value, s.value;</FONT> </P><BR>
  <P><FONT size=3D2>HTH</FONT> </P>
  <P><FONT size=3D2>Djordje</FONT> </P>
  <P><FONT size=3D2>----- Original Message -----</FONT> <BR><FONT =
size=3D2>To:=20
  Multiple recipients of list ORACLE-L = &lt;ORACLE-L_at_fatcity.com&gt;</FONT>=20
  <BR><FONT size=3D2>Sent: Wednesday, November 29, 2000 5:09 PM</FONT> = </P><BR>
  <P><FONT size=3D2>&gt; Really, I didn't work&nbsp; with such a big = temp=20
  tablespace, but</FONT> <BR><FONT size=3D2>&gt; I recommend you = creating it as a=20
  temporary tablespace because oracle</FONT> <BR><FONT size=3D2>behaves = different=20
  for allocating sort extents at temporary tablespaces.</FONT> <BR><FONT =

  size=3D2>&gt; Good luck.</FONT> <BR><FONT size=3D2>&gt;</FONT> = <BR><FONT=20
  size=3D2>&gt;</FONT> <BR><FONT size=3D2>&gt;</FONT> <BR><FONT = size=3D2>&gt; On Wed,=20
  29 Nov 2000 07:30:32 -0800 "Charlie Mengler" = &lt;charliem_at_mwh.com&gt;</FONT>=20
  <BR><FONT size=3D2>wrote:</FONT> <BR><FONT size=3D2>&gt; &gt; Oracle = V7.3.4.3 on=20
  Solaris V2.6</FONT> <BR><FONT size=3D2>&gt; &gt;</FONT> <BR><FONT = size=3D2>&gt;=20
  &gt; The volume of data I'm required to support has just = increased</FONT>=20
  <BR><FONT size=3D2>significantly.</FONT> <BR><FONT size=3D2>&gt; &gt; = I've been=20
  force to increase the size of TEMP to around 16GB to support</FONT> = <BR><FONT=20
  size=3D2>&gt; &gt; index creation on a new LARGE table. TEMP is/was = configured=20
  as -</FONT> <BR><FONT size=3D2>&gt; &gt;</FONT> <BR><FONT = size=3D2>&gt;=20
  &gt;</FONT> <BR><FONT size=3D2>&gt; &gt; SQL&gt; select * from = dba_tablespaces=20
  where tablespace_name =3D 'TEMP';</FONT> <BR><FONT size=3D2>&gt; = &gt;</FONT>=20
  <BR><FONT size=3D2>&gt; &gt;=20
  =
TABLESPACE_NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs= p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS</FONT> <BR><FONT = size=3D2>MAX_EXTENTS=20
  PCT_INCREASE STATUS&nbsp;&nbsp;&nbsp; CONTENTS</FONT> <BR><FONT=20   size=3D2>&gt;</FONT> <BR><FONT size=3D2>&gt; =

------------------------------=20
  -------------- ----------- ----------- ----</FONT> <BR><FONT =
size=3D2>-------=20

  from).&nbsp; You may</FONT> <BR><FONT size=3D2>&gt; &gt; also send the = HELP=20
  command for other information (like subscribing).</FONT> <BR><FONT = size=3D2>&gt;=20
  --</FONT> <BR><FONT size=3D2>&gt; Please see the official ORACLE-L = FAQ: <A=20
  target=3D_blank =
href=3D"http://www.orafaq.com">http://www.orafaq.com</A></FONT>=20   <BR><FONT size=3D2>&gt; --</FONT> <BR><FONT size=3D2>&gt; Author: = Emine=20
  ATES</FONT> <BR><FONT size=3D2>&gt;&nbsp;&nbsp; INET:=20   emineates_at_postmaster.co.uk</FONT> <BR><FONT size=3D2>&gt;</FONT> = <BR><FONT=20
  size=3D2>&gt; Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858)=20   538-5051&nbsp; FAX: (858) 538-5051</FONT> <BR><FONT size=3D2>&gt; San = Diego,=20
  California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public = Internet access=20
  / Mailing Lists</FONT> <BR><FONT size=3D2>&gt;=20   =

--------------------------------------------------------------------</FON=
T>=20
  <BR><FONT size=3D2>&gt; To REMOVE yourself from this mailing list, = send an=20
  E-Mail message</FONT> <BR><FONT size=3D2>&gt; to: ListGuru_at_fatcity.com = (note=20
  EXACT spelling of 'ListGuru') and in</FONT> <BR><FONT size=3D2>&gt; = the message=20
  BODY, include a line containing: UNSUB ORACLE-L</FONT> <BR><FONT = size=3D2>&gt;=20
  (or the name of mailing list you want to be removed from).&nbsp; You=20   may</FONT> <BR><FONT size=3D2>&gt; also send the HELP command for = other=20
  information (like subscribing).</FONT> </P>   <P><FONT size=3D2>-- </FONT><BR><FONT size=3D2>Please see the official = ORACLE-L=20
  FAQ: <A target=3D_blank=20
  href=3D"http://www.orafaq.com">http://www.orafaq.com</A></FONT> = <BR><FONT=20
  size=3D2>-- </FONT><BR><FONT size=3D2>Author: djordjej</FONT> = <BR><FONT=20
  size=3D2>&nbsp; INET: djordjej_at_home.com</FONT> </P>   <P><FONT size=3D2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) =

  538-5051&nbsp; FAX: (858) 538-5051</FONT> <BR><FONT size=3D2>San = Diego,=20
  California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public = Internet access=20
  / Mailing Lists</FONT> <BR><FONT=20
  =

size=3D2>----------------------------------------------------------------=
Received on Fri Dec 01 2000 - 03:52:54 CST

Original text of this message

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