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: Global Temporary Table

Re: Global Temporary Table

From: mcstock <mcstock_at_enquery.com>
Date: Thu, 23 Oct 2003 21:01:47 -0400
Message-ID: <zL6dndrEm7aF5wWiRVn-tw@comcast.com>


even though the data is session-specific, keep in mind that their may not be a persistent session for the users in your web application -- for instance, the PL/SQL webtoolkit automatically does a commit after executing the procedure called via the URL -- so that would delete the rows in the temp table, and even if it didn't, they user would never return to the same session again to be able to retrieve the temp table contents

what is you web app architecture? if you aren't using a tool that has dedicated persistent connections, oracle's temporary tables aren't going to help.

-- 
----------------------------------------
Mark C. Stock
www.enquery.com
(888) 512-2048


"Howard J. Rogers" <hjr_at_dizwell.com> wrote in message
news:3f90f444$0$24515$afc38c87_at_news.optusnet.com.au...

> Raj wrote:
>
> > Hello Oraclegurus,
> >
> > I would like to know if i am doing the right thing or not??
> >
> > I've created a global temporary table "tempcomp".
> >
> > "create global temporary table tempcomp (col1 number,col2
> > char,col3varchar2)" .
> >
> > I looked into these groups and it was mentioned somewhere
> > that default is "on commit delete rows"... I am assuming that the rows
> > are being deleted after commit and not stored .
> >
> > We have a web application which would be calling a stored
> > procedure which inserts into a global temporary some values we need
> > the values only for temporary time i.e., till user wants to study
> > those values .
> >
> > The web client users could be many and they all connect the
> > application with their respective id but the database connectivity is
> > using only one database userid "scott" and accessing the schema and
> > shcema procedures.
> >
> > The procedure call does inserts into the temporary global
> > table.
> >
> > The data that would be inserted could be like this 'bike'
> > 'big' 'bum' etc
> >
> > question: If one web user queries the table .... "where col2
> > like 'b%'
> >
> > will he get the data which was inserted on execution of
> > procedure by the first user who caused the inserts 'bike' 'bum'etc
> > ..????
> >
> > or each web user is a seperate session and the select query
> > will be unique for each user ...?????
> >
> > Please let me know if i am using the right thing by using
> > global temporary table !
> >
> > Thanks in advance.
> > Regards,
> > Raj.
>
>
> The data that is inserted into a global temporary table is private to the
> session that put it there. If I insert 'bum', and you insert 'big', and
> fred does a select, fred sees no rows whatsoever. If I do a select, I see
> 'bum'; if you do a select, you see 'big'. No-one, under any circumstances,
> sees the entire set of rows that happen to be present at any one
> nano-second.
>
> Regards
> HJR
>
>
> --
> --------------------------------------------
> See my brand new website, soon to be full of
> new articles: www.dizwell.com.
> Nothing much there yet, but give it time!!
> --------------------------------------------
>
Received on Thu Oct 23 2003 - 20:01:47 CDT

Original text of this message

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