Tom Lane <[EMAIL PROTECTED]> writes: > The performance costs of that seem pretty daunting, however, especially when > you reflect that simply stepping over a varlena field would require > memcpy'ing its length word to someplace.
I think if you give up on disk and in-memory representations being the same then there are ways of finessing that. For example you could have all the lengths together in the header prior to the variable length fields. In a separate unrelated thought, if we bring back the idea of having logical and physical field orders be distinct then we could also have the initial table creation sort the fields to minimize padding. It won't always be perfect but sometimes it could help quite a bit. It also wouldn't help much if you start altering the table afterward but even then the next time you pg_dump and reload you'll get a more efficient layout. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org