Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Number vs. Number(p,s)
There is no memory advantage whatsoever because the memory needed only depends on the value stored but not on its definition as you can easily see by the dump() function.
Martin
VWP914 wrote:
>
> I am trying to decide whether I wan't to use floating point (NUMBER) or fixed
> point
> (NUMBER(p, s)) datatypes for my database design. Apart from having more
> control with the fixed point option, is there any advantage memory wise?
> For instance, if I know that I have a number that will never be greater than,
> say
> 99999.99, should I bother and assign it to NUMBER(7,2), or just go ahead and
> make it a NUMBER with no scale or precision declared?
>
> I just don't see the advantage of specifically declaring a precision and scale,
> when you can just make it a floating point. Especially, when you consider that
> you are making a guess (albeit an edjucated guess) as to the scale and
> precision of you column. If this guess turns out to be incorrect, and say you
> really should have chosen NUMBER(8,2), for example, your application will give
> you an error.
>
> Any advice here would be appreciated.
>
> Thomas
Received on Tue May 15 2001 - 10:10:51 CDT