X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 6D192D1C7F3 for ; Fri, 1 Aug 2003 16:06:50 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 53459-08 for ; Fri, 1 Aug 2003 13:05:38 -0300 (ADT) Received: from mail1.acecape.com (mail1.acecape.com [66.114.74.12]) by svr1.postgresql.org (Postfix) with ESMTP id 6DCF5D1C952 for ; Fri, 1 Aug 2003 13:06:44 -0300 (ADT) Received: from p65-147.acedsl.com (p65-147.acedsl.com [66.114.65.147]) by mail1.acecape.com (8.12.9/8.12.9) with ESMTP id h71G6i0H031778 for ; Fri, 1 Aug 2003 12:06:44 -0400 Date: Fri, 1 Aug 2003 12:08:18 -0400 (EDT) From: Francisco Reyes X-X-Sender: fran@zoraida.natserv.net To: PostgreSQL performance Subject: How number of columns affects performance Message-ID: <20030801115257.I92555@zoraida.natserv.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/6 X-Sequence-Number: 2823 If a table which will be heavily used has numerous fields, yet only a handfull of them will be used heavily, would it make sense performance wise to split it? Example Table 1 Field 1 .... Field 100 Table 2 References Field 1 of table1 ..... Table n References Field 1 of table 1 So table 1 basically will be referenced by many tables and most of the time only a handfull of fields of table 1 are needed. Don't have exact numbers, but let's say that more than 60% of queries to table 1 queries only use 20 fields or less. If I split Table 1 then the second table will basically be a 1 to 1 to Table 1. I have this simmilar scenario for two tables. One is close to 1 Million records and the other is about 300,000 records. Programming wise it is much easier to only have one table, but I am just concerned about performance. Most access to these tables will be indexed with some occassional sequential scans. Number of concurrent users now is probably 10 or less. Expect to grow to 20+ concurrent connections. Will this be more of an issue if I had hundreds/thousands of users?