Re: [HACKERS] logical column order and physical column order

2013-11-05 Thread Alvaro Herrera
David Rowley escribió: > In this case how does Postgresql know that attnum 3 is the 2nd user column > in that table? Unless I have misunderstood something then there must be > some logic in there to skip dropped columns and if so then could it not > just grab the "attphynum" at that location? then

Re: [HACKERS] logical column order and physical column order

2013-11-04 Thread David Rowley
On Mon, Nov 4, 2013 at 3:14 AM, Alvaro Herrera wrote: > David Rowley escribió: > > I've just been looking at how alignment of columns in tuples can make the > > tuple larger than needed. > > This has been discussed at length previously, and there was a design > proposed to solve this problem. See

Re: [HACKERS] logical column order and physical column order

2013-11-03 Thread David Johnston
David Rowley wrote > I'm sure in the real world there are many cases where a better choice in > column ordering would save space and save processing times, but is this > something that we want to leave up to our users? Right now there is little visibility, from probably 99% of people, that this is

Re: [HACKERS] logical column order and physical column order

2013-11-03 Thread Alvaro Herrera
David Rowley escribió: > I've just been looking at how alignment of columns in tuples can make the > tuple larger than needed. This has been discussed at length previously, and there was a design proposed to solve this problem. See these past discussions: http://archives.postgresql.org/pgsql-hac

Re: [HACKERS] logical column order and physical column order

2013-11-03 Thread Martijn van Oosterhout
On Sun, Nov 03, 2013 at 09:40:18PM +1300, Gavin Flower wrote: > I think the system should PHYSICALLY store the columns in the most > space efficient order, and have a facility for mapping to & from the > LOGICAL order - so that users & application developers only have > worry about the logical orde

Re: [HACKERS] logical column order and physical column order

2013-11-03 Thread Gavin Flower
On 03/11/13 20:37, David Rowley wrote: I've just been looking at how alignment of columns in tuples can make the tuple larger than needed. I created 2 tables... None of which are very real world, but I was hunting for the extremes here... The first table contained an int primary key and then

[HACKERS] logical column order and physical column order

2013-11-03 Thread David Rowley
I've just been looking at how alignment of columns in tuples can make the tuple larger than needed. I created 2 tables... None of which are very real world, but I was hunting for the extremes here... The first table contained an int primary key and then a total of 10 int columns and 10 boolean co