Re: int2 vs int4 in Postgres - Mailing list pgsql-performance

From Tom Lane
Subject Re: int2 vs int4 in Postgres
Date
Msg-id 5079.1127775631@sss.pgh.pa.us
Whole thread Raw
In response to Re: int2 vs int4 in Postgres  (Chris Browne <cbbrowne@acm.org>)
List pgsql-performance
Chris Browne <cbbrowne@acm.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

pgsql-performance by date:

Previous
From: "Qingqing Zhou"
Date:
Subject: Re: Query seem to slow if table have more than 200 million rows
Next
From: Ron Peacetree
Date:
Subject: Re: [HACKERS] A Better External Sort?