Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-performance by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group