pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Chris Browne <cbbrowne@acm.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: int2 vs int4 in Postgres
Date: Mon, 26 Sep 2005 19:00:31 -0400
Message-ID: <5079.1127775631@sss.pgh.pa.us> (raw)
In-Reply-To: <60br2flcyz.fsf@dba2.int.libertyrms.com>
References: <KBEKKNMFLELKGIADDEPEGEOKCAAA.truthhurts@insightbb.com>
	<60br2flcyz.fsf@dba2.int.libertyrms.com>

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



view thread (6+ messages)

Message-ID: <5079.1127775631@sss.pgh.pa.us>
Permalink:  ../5079.1127775631@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/5079.1127775631@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, cbbrowne@acm.org
  Subject: Re: int2 vs int4 in Postgres
  In-Reply-To: <5079.1127775631@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