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 A601BD1B9AC for ; Thu, 21 Aug 2003 14:03:03 -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 73059-10 for ; Thu, 21 Aug 2003 14:02:32 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 04849D1B975 for ; Thu, 21 Aug 2003 14:02:30 -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 h7LH285H014118; Thu, 21 Aug 2003 13:02:08 -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: <20030821162448.GC973@pleyel.kotnet.org> References: <20030821133538.GA973@pleyel.kotnet.org> <8509.1061477951@sss.pgh.pa.us> <20030821162448.GC973@pleyel.kotnet.org> Comments: In-reply-to Mathieu De Zutter message dated "Thu, 21 Aug 2003 18:24:48 +0200" Date: Thu, 21 Aug 2003 13:02:08 -0400 Message-ID: <14117.1061485328@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/306 X-Sequence-Number: 3122 Mathieu De Zutter writes: > Apart from avoiding views or subselects when sorting afterwards and > putting the whole bunch in a huge SQL statement (which i'll have to > produce on-the-fly), do you have an other alternative? See if you can avoid the subselects in the view's SELECT list. That's what's preventing 7.3 from doing a good job. regards, tom lane