Re: decimal(5) vs int8. Which more efficient.

From: Thomas Lockhart <lockhart(at)fourpalms(dot)org>
To: Francisco Reyes <lists(at)natserv(dot)com>
Cc: pgsql General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: decimal(5) vs int8. Which more efficient.
Date: 2002-03-09 03:52:17
Message-ID: 3C8986F1.C5DC18FB@fourpalms.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Arguile 2002-03-09 05:41:49 Re: How to check for successfull inserts
Previous Message Crash Dummy 2002-03-09 00:29:14 Query planner problem