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: Package Data vs Global Variables

Re: Package Data vs Global Variables

From: RC <rclarence_at_tyc.com>
Date: Wed, 05 Jan 2000 21:30:25 GMT
Message-ID: <s77dvh5ihu812@corp.supernews.com>

William Teo wrote:
>
>
> Hi,
>
> Currently I am working on a security module and the design of the program
> requires me to store all user rights(previllege) in as flags. When
security
> checks in required, I simply reference these pre-initialised flags.
>
> One solution is to initialised a list of global variables and set the
flag
> when the form is first instantiated. Another solution is to declare this
> list of flag in a package data section and then initialised it also when
the
> form start up.
>
> My question is which method is better?
> By storing the list of variables(possibly ~100s) in a package, it will be
> available throughout the session. But that will take up memory on the
> server side !
> Assuming I have 60 users, wouldn't it have a severe impact on the server
> performance?
>
> Thanks.
>
>

If you initialize the variables in a Package, you have a couple of options.  You can pin that section of code in memory with DBMS_SHARED_POOL.KEEP. This will effective cahce the package in the SGA so it won't be swapped out. It will also allow all your users to access to those package variables sionce they will share that memory space. This should reduce some of the memory usage for your users.

HTH RC

--
Posted via CNET Help.com
http://www.help.com/ Received on Wed Jan 05 2000 - 15:30:25 CST

Original text of this message

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