Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Saving a constant into the Oracle schema?

Re: Saving a constant into the Oracle schema?

From: DA Morgan <damorgan_at_exxesolutions.com>
Date: Wed, 02 Apr 2003 09:57:02 -0800
Message-ID: <3E8B246E.25831CD5@exxesolutions.com>


Thomas wrote:

> "DA Morgan" <damorgan_at_exxesolutions.com> wrote in message
> news:3E8A0009.249ED3D2_at_exxesolutions.com...
> > Sybrand Bakker wrote:
> >
> > > On Tue, 01 Apr 2003 10:49:14 -0800, DA Morgan
> > > <damorgan_at_exxesolutions.com> wrote:
> > >
> > > >Or enter it into a table.
> > > >
> > > >Daniel Morgan
> > >
> > > That is too obvious, isn't it. And it requires at least one logical
> > > I/O
> > >
> > > Sybrand Bakker, Senior Oracle DBA
> > >
> > > To reply remove -verwijderdit from my e-mail address
> >
> > True. But on the other hand it saves changing source code and running an
> > application module back through QA testing every six months.
> >
> > Daniel Morgan
> >

>

> Good point, Daniel. I was trying to avoid using a table; I'd like the
> lookup to be as fast as possible. But even though I would just be changing
> the value of the constant, I guess "technically" I would have to re-test the
> package. Are creating static one-row lookup tables acceptable? It seems
> like a waste to me.
>

> Plus, if I do create a package with the constant, I can move my existing
> PL/SQL procedures into the package, and have them use that value, instead of
> having the value hard-coded inside each separate PL/SQL block.
>

> Thanks,

>
> -Thomas

Then here's a compromise between Sybrand and myself guaranteed to work.

Put the value into a table and read it into a global session variable using the initialization section of a package. Then you have a millisecond performance hit when connecting and never have to validate it again.

Daniel Morgan Received on Wed Apr 02 2003 - 11:57:02 CST

Original text of this message

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