Re: Decimal vs. Bigint memory usage

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: Marti Raudsepp <marti(at)juffo(dot)org>
Cc: Gregor Vollmer <vollmer(at)ekp(dot)uni-karlsruhe(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: Decimal vs. Bigint memory usage
Date: 2011-09-30 06:00:39
Message-ID: 4E855B07.2090300@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 29/09/2011 9:13 PM, Marti Raudsepp wrote:

>> How does decimal store the number internally,

Numeric is stored as binary-coded decimal. This isn't fast.

I'd say using a bigint is a no-brainer unless you think there's a chance
you might exceed the maximum size for a 64-bit integer.

--
Craig Ringer

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2011-09-30 06:48:27 Re: could not access file "$libdir/pg_buffercache": No such file or directory
Previous Message John R Pierce 2011-09-30 05:53:22 Re: Deadlock of REINDEX and SELECT queries in PostgresSQL 7.4