Re: Does anybody use ORDER BY x USING y? - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Does anybody use ORDER BY x USING y?
Date
Msg-id 87zmq9ni4z.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Does anybody use ORDER BY x USING y?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Does anybody use ORDER BY x USING y?
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

> Greg Stark <gsstark@mit.edu> writes:
> > The thing is that these opclasses you're describing are closely related. It
> > ought to be possible to use a single index to produce results in any of the
> > four orders you describe.
> 
> Wrong --- only two of them.  You can't magically swap nulls from one end
> of the index to the other (and Hannu's flight of fantasy about double
> indexscans is just a flight of fantasy; it would be solving the problem
> at entirely the wrong place).

I think that was my flight of fantasy. I didn't say it was pretty but it would
solve the problem. Whereas having a separate opclass would mean someone would
need a second index to satisfy the ordering which seems silly.

-- 
greg



pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: Beta2 Wrap Up ...
Next
From: mark@mark.mielke.cc
Date:
Subject: Re: Does anybody use ORDER BY x USING y?