Re: Q: Structured index - which one runs faster?

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ernest E Vogelsinger <ernest@vogelsinger.at>
Cc: "pgsql-admin" <pgsql-admin@postgresql.org>
Date: 2003-05-23T00:00:14Z
Lists: pgsql-performance
Ernest E Vogelsinger <ernest@vogelsinger.at> writes:
> Do you know if there's a general performance difference between numeric
> (int4) and character (fixed-size char[5]) columns? The ident1 and ident2
> columns are planned to be char[5], only the third column (with least
> precedence) will be numeric.

int4 is certainly faster to compare than char(n), but I wouldn't contort
your database design on that basis... if the idents aren't naturally
integers, don't force them to be.

			regards, tom lane