Re: Simple Column reordering - Mailing list pgsql-hackers

From Lukas Kahwe Smith
Subject Re: Simple Column reordering
Date
Msg-id 45DF7B3E.7090707@pooteeweet.org
Whole thread Raw
In response to Re: Simple Column reordering  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Bruce Momjian wrote:
> Lukas Kahwe Smith wrote:
>> Simon Riggs wrote:
>>
>>> If this is standards-breaking as you say, I would withdraw immediately.
>>> I checked the SQL standard and could not see how this would do so. The
>>> standard states SELECT * would return columns in order; it doesn't say
>>> what that order should be, nor does CREATE TABLE enforce the ordering to
>>> be the same as it has specified, AFAICS. Please correct me and I will
>>> withdraw. Practical issues seem far stronger drivers than standards
>>> issues here, which is why the parameter would default=off.
>> I did not follow the entire thread. I just wanted to point out that IIRC 
>> MS SQL Server (and maybe also Sybase) do automatically optimize the 
>> internal order of how columns are stored to move fixed length (which 
>> also means non NULLable for these two servers) columns to the left. 
>> Maybe this will serve as a reference point (not necessarily for 
>> standards compliance of course).
> 
> And that optimized ordering shows up with SELECT *?

no .. like i said its just the internal order ..
I think I learned this piece of information from reading "SQL 
performance tuning" by Peter and Trudy .. dont have the book here right 
now to give a page number.

regards,
Lukas




pgsql-hackers by date:

Previous
From: Florian Weimer
Date:
Subject: Re: SCMS question
Next
From: Warren Turkal
Date:
Subject: developer wiki (was Re: SCMS question)