Re: int2 vs int4 in Postgres

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chris Browne <cbbrowne(at)acm(dot)org>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: int2 vs int4 in Postgres
Date: 2005-09-26 23:00:31
Message-ID: 5079.1127775631@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Chris Browne <cbbrowne(at)acm(dot)org> writes:
> If the field is immaterial in terms of the size of the table, then it
> won't help materially.
> If you were going to index on it, however, THAT would make it
> significant for indices involving the "genre" column. Fitting more
> tuples into each page is a big help, and this would help.

For a multicolumn index it might help to replace int4 by int2. For a
single-column index, alignment constraints on the index entries will
prevent you from saving anything :-(

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Ron Peacetree 2005-09-27 01:10:47 Re: [PERFORM] A Better External Sort?
Previous Message Chris Browne 2005-09-26 21:47:19 Re: int2 vs int4 in Postgres