Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id AF9029FB266 for ; Wed, 18 Oct 2006 12:06:02 -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 01560-09 for ; Wed, 18 Oct 2006 15:05:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from serveurmail01.codata.be (125.123.146.82.ipv4.evonet.be [82.146.123.125]) by postgresql.org (Postfix) with ESMTP id D1AC49FA4AD for ; Wed, 18 Oct 2006 12:05:54 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by serveurmail01.codata.be (Postfix) with ESMTP id 39154183877A; Wed, 18 Oct 2006 17:05:54 +0200 (CEST) X-DSPAM-Result: Innocent X-DSPAM-Processed: Wed Oct 18 17:05:48 2006 X-DSPAM-Confidence: 0.6796 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 453642cc288631804284693 X-DSPAM-Factors: 27, X-Virus-Scanned: amavisd-new at Received: from serveurmail01.codata.be ([127.0.0.1]) by localhost (serveurmail01.codata.be [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VDDvPFf-EfEu; Wed, 18 Oct 2006 17:05:48 +0200 (CEST) Received: from [127.0.0.1] (103.186-112-217.adsl.belcenter.be [217.112.186.103]) by serveurmail01.codata.be (Postfix) with ESMTP id 5F38B18386A0; Wed, 18 Oct 2006 17:05:48 +0200 (CEST) Message-ID: <453642CC.8070804@freesurf.fr> Date: Wed, 18 Oct 2006 17:05:48 +0200 From: Arnaud Lesauvage User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Heikki Linnakangas CC: pgsql-performance@postgresql.org Subject: Re: Index on two columns not used References: <45360E25.9010403@freesurf.fr> <45361295.9050504@enterprisedb.com> <45361A2D.6080702@freesurf.fr> <453632C5.50501@enterprisedb.com> <453636F1.7000903@freesurf.fr> <45363F3B.1080109@enterprisedb.com> In-Reply-To: <45363F3B.1080109@enterprisedb.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 0642-2, 18/10/2006), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.335 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/358 X-Sequence-Number: 21487 Heikki Linnakangas a écrit : > Arnaud Lesauvage wrote: >> It is quite typical, yes. It is the base query of a view. In fact, most >> views have a lot more joins (they join with all the upper-level tables). >> But 150ms is OK, indeed. > > If the query using the view does anything more than a "SELECT * FROM > view", you should do an explain analyze of the query instead of the > definition of the view. The access plan might look very different. The views are used as linked tables in an Access Frontend. Some accesses are "select * from view", others might filter on a country_id or something similar. For the moment performance is good, so I think I'll keep a normalized database as long as it is possible ! Thanks for your help Heikki !