Faster data type for one-length values - Mailing list pgsql-general

From André Volpato
Subject Faster data type for one-length values
Date
Msg-id 46544661.4020002@ecomtecnologia.com.br
Whole thread Raw
Responses Re: Faster data type for one-length values
List pgsql-general
Hello,

I need to store one-length values like '1', '2', '3' or '4' .

Today, this field is indexed with btree and is of type smallint (int2).
How much performance will be improved if I change it to "char" (1 byte
length) ? Or int2 is the best solution in this case ?

Thanks !

--
[]´s,

André Volpato
ECOM Tecnologia Ltda
andre.volpato@ecomtecnologia.com.br




pgsql-general by date:

Previous
From: "J. ORIOL"
Date:
Subject: Re: Several queries consume 100 % processor
Next
From: PFC
Date:
Subject: Re: Integrity on large sites