Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 172D79FB336 for ; Wed, 18 Oct 2006 16:19:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 58457-03 for ; Wed, 18 Oct 2006 19:19:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 97CD59FB2CC for ; Wed, 18 Oct 2006 16:19:07 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id C1E3156427; Wed, 18 Oct 2006 14:19:06 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Wed, 18 Oct 2006 14:19:01 -0500 Date: Wed, 18 Oct 2006 14:19:01 -0500 From: "Jim C. Nasby" To: Ruben Rubio Cc: Heikki Linnakangas , "Gregory S. Williamson" , pgsql-performance@postgresql.org Subject: Re: Optimization of this SQL sentence (SOLVED) Message-ID: <20061018191901.GO85041@nasby.net> References: <45349CDF.3090002@rentalia.com> <71E37EF6B7DCC1499CEA0316A256832802B3E738@loki.wc.globexplorer.net> <4534A35E.9030909@rentalia.com> <4534A9B2.8060401@enterprisedb.com> <4534AFA3.5060102@rentalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4534AFA3.5060102@rentalia.com> X-Operating-System: FreeBSD 6.1-RELEASE-p10 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.13 (2006-08-11) X-Hashcash: 1:20:061018:ruben@rentalia.com::MglKbXm7b/7Xi25W:0000000000000000000 0000000000000000000000007ADN X-Hashcash: 1:20:061018:heikki@enterprisedb.com::b030+yjIB9Iuu1Fc:00000000000000 0000000000000000000000001Djb X-Hashcash: 1:20:061018:gsw@globexplorer.com::33HV1Zfmu2OnwEcW:00000000000000000 0000000000000000000000009lyi X-Hashcash: 1:20:061018:pgsql-performance@postgresql.org::EX300u2ZUXzQMH1+:00000 0000000000000000000000005zSY X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200610/367 X-Sequence-Number: 21496 On Tue, Oct 17, 2006 at 12:25:39PM +0200, Ruben Rubio wrote: > First of all I have to say that I now the database is not ok. There was > a people before me that didn't do the thinks right. I would like to > normalize the database, but it takes too much time (there is is hundred > of SQLs to change and there is not enough technical resources). Also, > datacolumns in some places has same names, but the data that is stores > has different usages. FWIW, things like views and rules make those transations a lot easier to tackle. -- Jim Nasby jim@nasby.net EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)