Re: What are the adavantages on Packages?

From: DanHW <danhw_at_aol.com>
Date: 1998/02/02
Message-ID: <19980202014400.UAA06754_at_ladder02.news.aol.com>#1/1


>I have a set of stored procedures that i am calling from a series of OCI
>programs. I need to define a package to hold a global cursor variable in
>order to process the result sets, but should i put these procs into
>packages? What is the advantage to using packages? I understand the
>advantage of stored procedures (in memory, pre-parsed,...) but do
>packages have any additional benefits beyond encapsulating the
>procedures?
>
>I have 3 options that i can take - any comments as to the
>advatages/disadvatages to these:
>
>1. all stored procedures exist as a stand-alone stored procedure 2. group
>my stored procedures into several different packages by functionality 3.
>create 1 huge package that contains all of the stored procedures that i
>am going to call from my OCI program.
>
>From the OCI programmers point of view there is no difference, from the
>PL/SQL programmers point of view there is almost no difference. So then
>what option is best?
>
>Thanks for any help!
>
>-david m rosner

Thomas Kyte did a very good discussion of the advantages, but there was one thing he didn't mention regarding your exact question. You can put all the procedures in one package, but I believe (someone correct me if I am wrong...) that once you call one procedure from a package, the entire package is loaded (and compiled if necessary). Thus, if you would really want them be organized by functionality so only the ones you need (or are likely to need) are loaded. Received on Mon Feb 02 1998 - 00:00:00 CET

Original text of this message