Re: [HACKERS] [GENERAL] Large databases, performance

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas SB SD
Тема Re: [HACKERS] [GENERAL] Large databases, performance
Дата
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA4887A5A@m0114.s-mxs.net
обсуждение исходный текст
Ответы Re: [HACKERS] [GENERAL] Large databases, performance  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-performance
> if i'm not mistaken, a char(n)/varchar(n) column is stored as a 32-bit
> integer specifying the length followed by as many characters as the
> length tells.  On 32-bit Intel hardware this structure is aligned on a
> 4-byte boundary.

Yes.

> | opc0     char (3)   no    no       8     4
> | opc1     char (3)   no    no       8     4
> | opc2     char (3)   no    no       8     4

> Hackers, do you think it's possible to hack together a quick and dirty
> patch, so that string length is represented by one byte?  IOW can a
> database be built that doesn't contain any char/varchar/text value
> longer than 255 characters in the catalog?

Since he is only using fixchar how about doing a fixchar implemetation, that
does not store length at all ? It is the same for every row anyways !

Andreas

В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Large databases, performance
Следующее
От: "Marie G. Tuite"
Дата:
Сообщение: sloooow query