Re: Fixed length data types issue
От | Gregory Stark |
---|---|
Тема | Re: Fixed length data types issue |
Дата | |
Msg-id | 8764fwwwz7.fsf@stark.xeocode.com обсуждение исходный текст |
Ответ на | Re: Fixed length data types issue (Gregory Stark <stark@enterprisedb.com>) |
Список | pgsql-hackers |
Gregory Stark <stark@enterprisedb.com> writes: > Tom Lane <tgl@sss.pgh.pa.us> 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. Hm, this might have nice cache effects when reading in a tuple too. Since all the lengths would likely fit in a single cache line and probably the same cache line as the null bitmap even it means you can find all the offsets without actually having to bring in the rest of the tuple into the processor. I don't think that alone would be enough to outweigh the costs of having to convert to an in-memory representation though. Even if that was still just a pointer to the buffer memory in the simple case. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: