Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 5729F9FB302 for ; Wed, 18 Oct 2006 11:51:18 -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 01275-04 for ; Wed, 18 Oct 2006 14:50:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from edb06.mail01.enterprisedb.com (63-246-7-171.contegix.com [63.246.7.171]) by postgresql.org (Postfix) with ESMTP id C7DE09FB287 for ; Wed, 18 Oct 2006 11:50:58 -0300 (ADT) thread-index: AcbyxM+HPhslhcmbTXOXcP40sQ24UQ== Received: from [192.168.0.20] ([62.232.55.86]) by edb06.mail01.enterprisedb.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Wed, 18 Oct 2006 10:50:53 -0400 Message-ID: <45363F3B.1080109@enterprisedb.com> Content-Class: urn:content-classes:message Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2757 Date: Wed, 18 Oct 2006 15:50:35 +0100 From: "Heikki Linnakangas" User-Agent: Thunderbird 1.5.0.7 (X11/20060915) MIME-Version: 1.0 To: "Arnaud Lesauvage" Cc: 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> In-Reply-To: <453636F1.7000903@freesurf.fr> Content-Type: text/plain; format=flowed; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 18 Oct 2006 14:50:53.0500 (UTC) FILETIME=[CF798FC0:01C6F2C4] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/356 X-Sequence-Number: 21485 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. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com