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 46B85D1BB27 for ; Thu, 21 Aug 2003 11:59:29 -0300 (ADT) 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 37182-01 for ; Thu, 21 Aug 2003 11:59:14 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 5ACEFD1B8C8 for ; Thu, 21 Aug 2003 11:59:14 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h7LExC5H008510; Thu, 21 Aug 2003 10:59:12 -0400 (EDT) To: Mathieu De Zutter Cc: pgsql-performance@postgresql.org Subject: Re: Sorting a query on a view ignores an index In-reply-to: <20030821133538.GA973@pleyel.kotnet.org> References: <20030821133538.GA973@pleyel.kotnet.org> Comments: In-reply-to Mathieu De Zutter message dated "Thu, 21 Aug 2003 15:35:38 +0200" Date: Thu, 21 Aug 2003 10:59:11 -0400 Message-ID: <8509.1061477951@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/303 X-Sequence-Number: 3119 Mathieu De Zutter writes: > However, i dont want the view to be presorted, but sort it in the > queries that use the view. When I do that, the index I have on that > field seems to be ignored. It stretches so far that, when I sort the > view on A and sort the query on A too, the query will try to sort > _again_ _without_ index and thus lose all performance. This is a limitation of the 7.3 query planner. 7.4 should do better. regards, tom lane