X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0A1318BA161 for ; Mon, 21 Feb 2005 01:29:32 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 07177-01 for ; Mon, 21 Feb 2005 01:29:25 +0000 (GMT) Received: from mailhub2.une.edu.au (mailhub2.une.edu.au [129.180.1.142]) by svr1.postgresql.org (Postfix) with ESMTP id D33458BA041 for ; Mon, 21 Feb 2005 01:29:26 +0000 (GMT) Received: from icarus.une.edu.au (icarus.une.edu.au [129.180.47.120]) by mailhub2.une.edu.au (Postfix) with ESMTP id 138557EFF; Mon, 21 Feb 2005 12:29:25 +1100 (EST) Received: from kgb ([129.180.47.225]) by icarus.une.edu.au (8.12.8/8.12.8) with SMTP id j1L1TOnb028329; Mon, 21 Feb 2005 12:29:24 +1100 Date: Mon, 21 Feb 2005 12:30:21 +1100 From: Klint Gore To: Tom Lane Cc: pgsql-performance@postgresql.org, Gaetano Mendola Subject: Re: bad performances using hashjoin In-Reply-To: <15413.1108925170@sss.pgh.pa.us> References: <15413.1108925170@sss.pgh.pa.us> Message-Id: <421939AD2A4.CE73KG@129.180.47.120> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver 1.25.06 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200502/277 X-Sequence-Number: 10606 On Sun, 20 Feb 2005 13:46:10 -0500, Tom Lane wrote: > sat_request rows. If this is the case you actually need to optimize, > probably the thing to do is to get rid of the ORDER BY clauses you > evidently have in your views, so that there's some chance of building > a fast-start plan. Is having an order by in a view legal? In sybase ASA, mssql it throws a syntax error if there's an order by. If so, does it do 2 sorts when you sort by something else? i.e. if view is create view v1 as select * from table order by 1; and the statment select * from v1 order by 2; is run does it sort by 1 then resort by 2? klint. +---------------------------------------+-----------------+ : Klint Gore : "Non rhyming : : EMail : kg@kgb.une.edu.au : slang - the : : Snail : A.B.R.I. : possibilities : : Mail University of New England : are useless" : : Armidale NSW 2351 Australia : L.J.J. : : Fax : +61 2 6772 5376 : : +---------------------------------------+-----------------+