Re: Order of columns in query is important?! - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Order of columns in query is important?!
Date
Msg-id CANP8+jL0KjFE3+zC=YBA+oPrLn7QPYyUnGAwWmm9c2YYb1XZmQ@mail.gmail.com
Whole thread Raw
In response to Re: Order of columns in query is important?!  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
List pgsql-hackers
On 25 May 2015 at 11:48, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> wrote:
On 2015-05-25 PM 06:26, Colin 't Hart wrote:
 
That means the specified order of columns in a query does matter which would
have to match the defined order in order to avoid extra processing (that is
only when specified columns *exactly* matches the tuple descriptor).

...and it matters a lot in those cases because we are sorting all of the data scanned, not just 25 rows. 

--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-hackers by date:

Previous
From: CK Tan
Date:
Subject: Re: Order of columns in query is important?!
Next
From: Stephen Frost
Date:
Subject: Re: fsync-pgdata-on-recovery tries to write to more files than previously