X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CEC8AD97C4 for ; Mon, 26 Sep 2005 20:00:33 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 25593-08 for ; Mon, 26 Sep 2005 23:00:29 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 79003D97BB for ; Mon, 26 Sep 2005 20:00:30 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j8QN0VOH005080; Mon, 26 Sep 2005 19:00:31 -0400 (EDT) To: Chris Browne Cc: pgsql-performance@postgresql.org Subject: Re: int2 vs int4 in Postgres In-reply-to: <60br2flcyz.fsf@dba2.int.libertyrms.com> References: <60br2flcyz.fsf@dba2.int.libertyrms.com> Comments: In-reply-to Chris Browne message dated "Mon, 26 Sep 2005 17:45:56 -0400" Date: Mon, 26 Sep 2005 19:00:31 -0400 Message-ID: <5079.1127775631@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200509/363 X-Sequence-Number: 14671 Chris Browne 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