Re: Do Layered Views/Relations Preserve Sort Order ? - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: Do Layered Views/Relations Preserve Sort Order ?
Date
Msg-id 55F6F941.4020308@BlueTreble.com
Whole thread Raw
In response to Re: Do Layered Views/Relations Preserve Sort Order ?  (Charles Sheridan <cesheri@swbell.net>)
List pgsql-hackers
On 9/9/15 7:55 PM, Charles Sheridan wrote:
>> The better question is how expensive is it to sort already sorted
>> data.  If its cheap, and it likely is, then placing explicit sorting
>> where you care is the best solution regardless of your level of
>> confidence that lower level sorting is being maintained.
...

> David,  yes, I agree that sorting at the end is the highest-confidence
> approach.  I don't (yet) have a large stack of views with an assumption
> of a guaranteed underlying sort order, I'm just trying to get a better
> sense of what Postgres behavior I can reasonably expect here.

BTW, I believe there is some code in the planner to remove useless 
ORDER-BYs.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com



pgsql-hackers by date:

Previous
From: Egon Kocjan
Date:
Subject: [PATCH] add --log-output to pg_ctl on Windows
Next
From: "Shulgin, Oleksandr"
Date:
Subject: Re: On-demand running query plans using auto_explain and signals