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 55437DA097 for ; Mon, 10 Oct 2005 23:14:18 -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 63233-05 for ; Tue, 11 Oct 2005 02:14:13 +0000 (GMT) Received: from sccimhc92.asp.att.net (sccimhc92.asp.att.net [63.240.76.166]) by svr1.postgresql.org (Postfix) with ESMTP id 29CCFDA0CF for ; Mon, 10 Oct 2005 23:14:15 -0300 (ADT) Received: from krunk (12-202-107-96.client.insightbb.com[12.202.107.96]) by sccimhc92.asp.att.net (sccimhc92) with SMTP id <20051011021419i92001u8ehe>; Tue, 11 Oct 2005 02:14:19 +0000 From: "Announce" To: "Jim C. Nasby" Cc: Subject: Re: What's the cost of a few extra columns? Date: Mon, 10 Oct 2005 21:14:12 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1250" 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) In-Reply-To: <20051011001249.GJ39569@pervasive.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 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/183 X-Sequence-Number: 14951 Thanks a lot. Well, if I'm understanding you correctly, then doing the vertical splitting for some of the text columns WOULD decrease the average row size returned in my slimmer PRODUCTIONS table. I don't plan on using any of the "prod_info" columns in a WHERE clause (except open_date and close_date now that I think of it so they would stay in the original table). There will be a lot of queries where I just want to return quick pri-key, prod_name and prod_date results from a PRODUCTION search. Then, there would be a detail query that would then need all of the PRODUCTION and INFO data for a single row. Thanks again, Aaron -----Original Message----- Subject: Re: [PERFORM] What's the cost of a few extra columns? What you're describing is known as vertical partitioning (think of splitting a table vertically), and can be a good technique for increasing performance when used properly. The key is to try and get the average row size down, since that means more rows per page which means less I/O. Some things to consider: First rule of performance tuning: don't. In other words, you should be able to verify with benchmark numbers that a) you need to do this and b) how much it's actually helping. How will splitting the table affect *_tstmp, especially mod_tstmp? How will you handle inserts and joining these two tables together? Will you always do a left join (preferably via a view), or will you have a trigger/rule that inserts into production_info whenever a row is inserted into productions? On Sun, Oct 09, 2005 at 10:03:33PM -0500, Announce wrote: