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 2C756D9A46 for ; Mon, 10 Oct 2005 01:41:19 -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 85868-09 for ; Mon, 10 Oct 2005 04:41:14 +0000 (GMT) Received: from sccimhc91.asp.att.net (sccimhc91.asp.att.net [63.240.76.165]) by svr1.postgresql.org (Postfix) with ESMTP id 97121D8CD9 for ; Mon, 10 Oct 2005 00:03:41 -0300 (ADT) Received: from krunk (12-202-107-96.client.insightbb.com[12.202.107.96]) by sccimhc91.asp.att.net (sccimhc91) with SMTP id <20051010030339i91001dftte>; Mon, 10 Oct 2005 03:03:39 +0000 From: "Announce" To: Subject: What's the cost of a few extra columns? Date: Sun, 9 Oct 2005 22:03:33 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 required=5 tests=[none] X-Spam-Level: X-Archive-Number: 200510/156 X-Sequence-Number: 14924 What's goin on pg-people? I have a table PRODUCTIONS that is central to the DB and ties a lot of other information together: PRODUCTIONS (table) ---------------------------------- prod_id primary key type_id foreign key level_id foreign key tour_id foreign key show_id foreign key venue_id foreign key title varchar(255); not null indexed version char; details text open_date date close_date date preview_open date preview_close date perform_tot int preview_tot int park_info text phone_nos text some_other_info text seating_info text this text that text create_tstmp timestamptz; NOW() mod_tstmp timestamptz;triggered delete_tstmp timestamptz;default null is_complete bool As it stands now, there are approximately 25-30 columns on the table. Since this table is very central to the database, would it be more efficient to break some of the columns (especially the TEXT ones) out into a separate INFO table since some queries on the web will not care about all of these text columns anyway? I know that pg can handle A LOT more columns and if there IS no performance hit for keeping them all on the same table, I would like to do that because the relation between PRODUCTIONS and the INFO will always be 1-to-1. My implementation of this INFO table would look a little somethin' like this: PROD_INFO (table) ------------------------------- prod_id pkey/fkey open_date date close_date date preview_open date preview_close date perform_tot int preview_tot int park_info text phone_nos text some_other_info text seating_info text this text that text (the rest would stay in in the original PRODUCTIONS table) I am open to ANY suggestions, criticisms, mockery, etc. Thanks, Aaron