Column Tetris Automatisation

From: Nicolas Paris <niparisco(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Column Tetris Automatisation
Date: 2017-01-15 09:58:10
Message-ID: 20170115095810.GK17578@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

In postgresl order of columns does have an non negligeable impact on table size[1].
Table are in many cases dynamic, and new fields can appear in the database life.
I suspect re-ordering columns based on types would be an automatisable task would be feaseable such:

```
reorderTableWithTetrisAlgo(table)
return reordered_table
```

Moreover, most client code should not be dependent on column order. Then a TETRIS option
in VACUUM FULL would be usefull for many users.

```
VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [TETRIS] [ table ]
```

Does that makes sens ?

Thanks,

[1] https://developing.enectiva.cz/2016/05/15/postgres-column-tetris/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2017-01-15 10:01:57 Re: Column Tetris Automatisation
Previous Message John R Pierce 2017-01-15 09:42:37 Re: Building PL/Perl procedural language without --with-perl configure flag