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: Oracle 8.1.x - PL/SQL - Caching ?!?

Re: Oracle 8.1.x - PL/SQL - Caching ?!?

From: Vladimir M. Zakharychev <bob_at_dpsp-yes.com>
Date: Thu, 21 Feb 2002 11:27:05 +0300
Message-ID: <a52aqe$3e5$1@babylon.agtel.net>


dbms_session.set_context and sys_context() may be used for session-persistent data storage. It has its tradeoffs, but is pretty powerful otherwise. The only real tradeoff is that session context can only store varchar2 values (and I am not sure about the size limit for each value). Another issue is that when you create a context, you assign it to a certain package and only this package can modify the context (that is, call dbms_session.set_context). Any other proc will be able to read it with sys_context() though. Thomas Kyte has some real life examples of contexts use at http://asktom.oracle.com - use search to find references to sys_context there. Also, read Oracle docs on CREATE CONTEXT and related topics.

-- 
Vladimir Zakharychev (bob@dpsp-yes.com)                http://www.dpsp-yes.com
Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet applications.
All opinions are mine and do not necessarily go in line with those of my employer.


"damorgan" <dan.morgan_at_ci.seattle.wa.us> wrote in message news:3C7437D2.78369F3_at_ci.seattle.wa.us...

> Would a global temporary table solve the problem?
>
> Daniel Morgan
>
>
>
> Walter Dorninger wrote:
>
> > Hi,
> >
> > Im facing the problem that I need to cache some information in my PL/SQL
> > Proc/Func. (when exiting the PL/SQL procedure/function the cache should
> > still be there for the next call).
> > Are there any methods for caching certain information using PL/SQL code
> > (just to avoid expensive lookups between some independent PL/SQL calls).
> >
> > The only one I am aware of is to create a "cached" table in a temporary
> > tablespace.
> >
> > Are there other solutions around?
> >
> > Walter Dorninger
> > walter.dorninger_at_aon.at
>
Received on Thu Feb 21 2002 - 02:27:05 CST

Original text of this message

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