Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Package vs standalone for single function/procedure?
I don't think this is the case. If you have lots of standalone functions and procedures, then anytime one of them is referenced, it has to be loaded into the SGA - if its not already loaded).
That means, if you have 10 standalone functions/procedures, then you have potentially 10 memory loads.
If you have one package with 10 functions/procedures then that is one memory load.
Now, if you have 10 packages each with one function/procedure , you still have 10 memory loads.
So, it is not really sensible to put just one function or procedure into a package, unless you have some other good reason to do so.
Look at Steve Feuerstein's book on Oracle Pl/SQL Programming (O'Reilly).
HOMES wrote in message <9306hb$qrl$1_at_nnrp1.deja.com>...
>I've been told that placing a single function or procedure in a package
>will give better performance than writing a standalone function or
>procedure. Can someone confirm or refute? The argument was that a
>standalone will require all standalones to get loaded into memory,
>whereas the package will only require itself to be loaded. Sounds
>hokey, but I'd like to be sure. Any pointers to specific documentation
>would be great as well.
>
>
>Thanks.
>
>
>
>Sent via Deja.com
>http://www.deja.com/
Received on Thu Jan 04 2001 - 08:51:35 CST