From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ernest E Vogelsinger <ernest@vogelsinger.at>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Q: Structured index - which one runs faster?
Date: Thu, 22 May 2003 20:00:14 -0400
Message-ID: <12259.1053648014@sss.pgh.pa.us> (raw)
In-Reply-To: <5.1.1.6.2.20030523013910.03095bb8@mail.vogelsinger.at>
References: <5.1.1.6.2.20030522223909.05929600@mail.vogelsinger.at>
<5.1.1.6.2.20030522223909.05929600@mail.vogelsinger.at>
<5.1.1.6.2.20030523013910.03095bb8@mail.vogelsinger.at>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, ernest@vogelsinger.at, pgsql-admin@postgresql.org
Subject: Re: Q: Structured index - which one runs faster?
In-Reply-To: <12259.1053648014@sss.pgh.pa.us>
References: <5.1.1.6.2.20030522223909.05929600@mail.vogelsinger.at> <5.1.1.6.2.20030523013910.03095bb8@mail.vogelsinger.at> <12259.1053648014@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox