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: Global Temp Tables and Indexes

RE: Global Temp Tables and Indexes

From: Deshpande, Kirti <kirti.deshpande_at_verizon.com>
Date: Mon, 09 Jul 2001 10:00:33 -0700
Message-ID: <F001.0034471C.20010709085123@fatcity.com>

Hi Novicedba,
 There is a Note # 65973.1 on Metalink. It explains in detail how sort extent pool works. Rephrasing portions of it to include in this e-mail would not do any good to understand it clearly.  As far as my analogy of 'create table' with initial extent goes, it's just to illustrate that when you create a table with an initial extent set to a certain size, that much space is allocated to the table right away, but it does not contain any data. Whereas, with GTT such allocation of space does not take place until data is inserted into the GTT. Please refer to Note # 93756.1 for detail information on GTT.

 You may post any specific questions you may have after you review these notes. If you must address them to me, please send them to my personal e-mail address. As a follow up, I will try to respond. Thanks.

 HTH,    Regards,

> -----Original Message-----
> From: novicedba [SMTP:novicedba_at_hotmail.com]
> Sent: Monday, July 09, 2001 2:15 AM
> To: Multiple recipients of list ORACLE-L
> Subject: Re: Global Temp Tables and Indexes
>
> hi kirti,
> will you please tell me some more about extent pool and how 'create
> table'
> with initial extent works.
> Can you please guide me to the part of the manual or any link which would
> enlighten me
>
> coz
> I am a
> novice
> Oracle Certifiable DBBS
> ----- Original Message -----
> To: "Multiple recipients of list ORACLE-L" <ORACLE-L_at_fatcity.com>
> Sent: Thursday, June 28, 2001 10:30 AM
>
>
> > Bruce,
> > When the 1st row is inserted into GTT, Oracle will acquire the temp
> segment
> > in user's temporary tablespace and that will be reflected in
> v$sort_usage.
> > However, it will continue to hold the table's data in the PGA of the
> session
> > within the sort areas rather than in the data base buffer cache. When
> > sort_area_size worth of data is collected, it will be written to the
> already
> > acquired temp segment using the extent pool algorithm. Compare this to
> how
> > 'create table' with initial extent works, where a table segment is
> created
> > first, to be followed by inserts. Only in this case, 1st insert
> operation
> > creates the 'extent' but actual data is inserted at a later stage, if
> > required.
> > Hope this helps.
> >
> > Regards,
> >
> > - Kirti Deshpande
> > Verizon Information Services
> > http://www.superpages.com
> >
> > > -----Original Message-----
> > > From: Reardon, Bruce (CALBBAY)
> > > [SMTP:Bruce.Reardon_at_comalco.riotinto.com.au]
> > > Sent: Wednesday, June 27, 2001 8:30 PM
> > > To: Multiple recipients of list ORACLE-L
> > > Subject: RE: Global Temp Tables and Indexes
> > >
> > > Kirti,
> > >
> > > I am running 81712 on NT4 with a 1MB sort_area_size and a 1MB
> > > sort_area_retained_size.
> > >
> > > As soon as I insert 1 row into a 6 column GTT (
> > > VARCHAR2(2),NUMBER(5),NUMBER(5),NUMBER(8),VARCHAR2(1),DATE) I see a
> record
> > > appear in v$sort_usage.
> > > In testing, this the first thing I do as soon as I connect and I do
> not
> > > have
> > > a login script that runs any sorts.
> > >
> > > Why might this be (ie why isn't the row held entirely in the PGA given
> the
> > > 1M sort_area_size)?
> > >
> > > I altered the system's sort_area_size to 10M and reconnected and still
> > > after
> > > inserting just 1 row I see a record in v$sort_usage.
> > > I get the same behaviour regardless of whether the temp tablespace has
> > > temporary or permanent contents.
> > >
> > > Thanks,
> > > Bruce
> > >
> > >
> > > -----Original Message-----
> > > Sent: Thursday, 28 June 2001 11:06
> > >
> > > Jack,
> > > Those rows will be stored in session's PGA in the sort areas
> > > (sort_area_size). When you insert more rows to fill up sort_area_size,
> you
> > > will see the table using your temporary tablespace. Or you can alter
> your
> > > session to use much smaller sort_area_size. Also, you can check
> > > v$sort_usage view to see how the numbers change as you add to the GTT.
> > >
> > > Hope this helps,
> > >
> > > - Kirti Deshpande
> > > Verizon Information Services
> > > http://www.superpages.com
> > >
> > > > -----Original Message-----
> > > > From: Jack C. Applewhite [SMTP:japplewhite_at_inetprofit.com]
> > > > Sent: Wednesday, June 27, 2001 7:01 PM
> > > >
> > > > Hi,
> > > >
> > > > Using Oracle8i 8.1.6...
> > > >
> > > > I've created a Temp table and inserted a couple of rows, but there
> seems
> > > > to
> > > > be no way to verify that it's segment(s) is(are) in the temp
> tablespace
> > > of
> > > > the creating user. I've looked at every USER*, DBA*, and v$* view I
> can
> > > > find - Tablespace_Name is null in all of them. I inserted the rows
> > > > because
> > > > I know that the first extent of a temp table is not allocated until
> the
> > > > first insert.
> > > >
> > > > I'd like to see that the segment is where I think it is because I
> want
> > > > another user whose temp t.s. is on another drive to create an index
> on
> > > > that
> > > > table. That's the only way I can think of to get an index on a temp
> > > table
> > > > in another tablespace - for performance considerations.
> > > >
> > > > Anybody know how to verify the tablespace? Will my proposed method
> for
> > > > getting the temp index on the temp table on another drive work? Any
> > > > suggestions?
> > > >
> > > > Thanks.
> > > >
> > > > Jack
> > > >
> > > > --------------------------------
> > > > Jack C. Applewhite
> > > > Database Administrator/Developer
> > > > OCP Oracle8 DBA
> > > > iNetProfit, Inc.
> > > > Austin, Texas
> > > > www.iNetProfit.com
> > > > japplewhite_at_inetprofit.com
> > > > (512)327-9068
> > > --
> > > Please see the official ORACLE-L FAQ: http://www.orafaq.com
> > > --
> > > Author: Reardon, Bruce (CALBBAY)
> > > INET: Bruce.Reardon_at_comalco.riotinto.com.au
> > >
> > > Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> > > San Diego, California -- Public Internet access / Mailing Lists
> > > --------------------------------------------------------------------
> > > To REMOVE yourself from this mailing list, send an E-Mail message
> > > to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> > > the message BODY, include a line containing: UNSUB ORACLE-L
> > > (or the name of mailing list you want to be removed from). You may
> > > also send the HELP command for other information (like subscribing).
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
> > --
> > Author: Deshpande, Kirti
> > INET: kirti.deshpande_at_verizon.com
> >
> > Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> > San Diego, California -- Public Internet access / Mailing Lists
> > --------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from). You may
> > also send the HELP command for other information (like subscribing).
> >
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: novicedba
> INET: novicedba_at_hotmail.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Deshpande, Kirti
  INET: kirti.deshpande_at_verizon.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon Jul 09 2001 - 12:00:33 CDT

Original text of this message

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