X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.225.181]) by svr1.postgresql.org (Postfix) with ESMTP id C41E8CCC53 for ; Fri, 18 Jul 2003 07:06:42 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr5.postgresql.org [64.117.225.181]) (amavisd-new, port 10024) with ESMTP id 39871-04 for ; Fri, 18 Jul 2003 07:07:01 +0000 (GMT) Received: from anchor-post-35.mail.demon.net (anchor-post-35.mail.demon.net [194.217.242.85]) by svr1.postgresql.org (Postfix) with ESMTP id E422CCADB4 for ; Fri, 18 Jul 2003 04:06:30 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-35.mail.demon.net with esmtp (Exim 3.36 #2) id 19dPKX-0006ad-0Z; Fri, 18 Jul 2003 08:07:02 +0100 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 9F75416A61; Fri, 18 Jul 2003 08:07:00 +0100 (BST) Received: from client.archonet.com (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with ESMTP id F146E16A5F; Fri, 18 Jul 2003 08:06:59 +0100 (BST) Content-Type: text/plain; charset="iso-8859-1" From: Richard Huxton Organization: Archonet Ltd To: Steve Crawford , "Girish Bajaj" , Subject: Re: Table Partitioning and Rules Date: Fri, 18 Jul 2003 08:06:58 +0100 User-Agent: KMail/1.4.3 References: <003b01c34c98$ca9861f0$7764a8c0@tietronix.com> <200307171239.51837.scrawford@pinpointresearch.com> In-Reply-To: <200307171239.51837.scrawford@pinpointresearch.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200307180806.58921.dev@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/248 X-Sequence-Number: 14362 On Thursday 17 Jul 2003 8:39 pm, Steve Crawford wrote: > OK, so basically you are trying to keep a hundered some odd attributes on > everyone in the US. It's possible that a 150 column table is properly > normalized (I have a similar situation) but it is rare. > > Suppose it is really properly normalized. You can still benefit from > indexes on just some of the columns by choosing those most commonly used = in > queries. You may also want to research partial indexes (create index foo > ... where bar=3Dbaz) which can under certain circumstances be far smaller= and > faster than full indexes. The other issue is, that even if your table is normalised you may want to= =20 split vertically. That's going to depend on usage patterns, and I don't kno= w=20 what you've got, but say you used three tables: contact_address contact_personal contact_bank_details Now a search by sales would be interested in ...address & ...personal where= as=20 accounts would look at ...address & ...bank_details. This _might_ make sense, but probably only if you can group columns into=20 related groups and users are more interested in some groups than others. If= =20 you are lucky the gains might be in cache usage, whereas the costs will be = in=20 joining groups for results. I'm not saying you should do this just to try and improve performance, but = it=20 might make sense if users look at it that way. > Review your structure carefully. Plan on $$$ for the hardware. Or remind your users that patience is a virtue ;-) --=20 Richard Huxton