Re: bigint integers up to 19 digits.

From: Jochen Erwied <jochen(at)pgsql-performance(dot)erwied(dot)eu>
To: Tory M Blue <tmblue(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: bigint integers up to 19 digits.
Date: 2010-02-04 19:01:19
Message-ID: 1163141205.20100204200119@erwied.eu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Thursday, February 4, 2010, 7:51:37 PM you wrote:

> it is an identifier and is always a number and is used in grouping and
> querying. I thought I would lose performance if it is text vs an
> integer/double field.

Maybe using 'numeric(19)' instead of bigint is an alternative. I actually
don't know how these numbers are stored internally (some kind of BCD, or as
base-100?), but IMHO they should be faster than strings, although not as
fast as 'native' types.

--
Jochen Erwied | home: jochen(at)erwied(dot)eu +49-208-38800-18, FAX: -19
Sauerbruchstr. 17 | work: joe(at)mbs-software(dot)de +49-2151-7294-24, FAX: -50
D-45470 Muelheim | mobile: jochen(dot)erwied(at)vodafone(dot)de +49-173-5404164

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Alvaro Herrera 2010-02-04 20:09:29 Re: bigint integers up to 19 digits.
Previous Message Tory M Blue 2010-02-04 18:51:37 Re: bigint integers up to 19 digits.