Re: decimal(5) vs int8. Which more efficient. - Mailing list pgsql-general

From Thomas Lockhart
Subject Re: decimal(5) vs int8. Which more efficient.
Date
Msg-id 3C8986F1.C5DC18FB@fourpalms.org
Whole thread Raw
In response to decimal(5) vs int8. Which more efficient.  (Francisco Reyes <lists@natserv.com>)
Responses Re: decimal(5) vs int8. Which more efficient.
List pgsql-general
> What would be more efficient for storing a value that is 5 Bytes long?
> decimal(5) or int8?
> Does decimal(5) actually uses up only 5 bytes? Does that cause any
> problems?

int8 wins on all counts afaik. decimal() and numeric() store things as
quasi-BCD and is less dense than a true binary storage type.

                     - Thomas

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Is vacuum full lock like old's vacuum's lock?
Next
From: "Arguile"
Date:
Subject: Re: How to check for successfull inserts