By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,710 Members | 1,970 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,710 IT Pros & Developers. It's quick & easy.

How many memory size takes numeric(3,0) ?

P: n/a
Hello,

How many memory does take numeric(3,0) ?

Is it smaller than INT2 that takes 2 octets ?

Thanks in advance :-)

---------------------------------------
Bruno BAGUETTE - pg******@baguette.net
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 11 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Wed, Sep 03, 2003 at 21:00:32 +0200,
Bruno BAGUETTE <pg******@baguette.net> wrote:
Hello,

How many memory does take numeric(3,0) ?

Is it smaller than INT2 that takes 2 octets ?


It won't be smaller than int2.

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 11 '05 #2

P: n/a
Bruno BAGUETTE writes:
How many memory does take numeric(3,0) ?
Is it smaller than INT2 that takes 2 octets ?


numeric(x) takes about 10 + x/2 bytes in 7.3. I'm too lazy to calculate
it exactly, but int2 surely beats numeric in storage size and it kills it
in performance. The documentation contains information about choosing the
most appropriate data type:

http://www.postgresql.org/docs/7.3/s...TATYPE-NUMERIC

--
Peter Eisentraut pe*****@gmx.net
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 11 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.