Skip site navigation (1) Skip section navigation (2)

Re: bad performances using hashjoin

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Klint Gore <kg(at)kgb(dot)une(dot)edu(dot)au>
Cc: pgsql-performance(at)postgresql(dot)org,Gaetano Mendola <mendola(at)bigfoot(dot)com>
Subject: Re: bad performances using hashjoin
Date: 2005-02-21 02:01:17
Message-ID: 20287.1108951277@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Klint Gore <kg(at)kgb(dot)une(dot)edu(dot)au> writes:
> Is having an order by in a view legal?

Not according to the SQL spec, but PG has allowed it for several releases.
(The same goes for ORDER BY in a sub-select, which is actually pretty
much the same thing ...)

> If so, does it do 2 sorts when you sort by something else?

Yup.  It's something you'd only want for the topmost view in a stack,
IMHO.  A sort at a lower level is likely to be wasted effort.

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: David BrownDate: 2005-02-21 03:01:20
Subject: Re: bad performances using hashjoin
Previous:From: amritDate: 2005-02-21 01:34:45
Subject: Re: Problem with 7.4.5 and webmin 1.8 in grant function

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group