Re: byte-size of column values
От | David G. Johnston |
---|---|
Тема | Re: byte-size of column values |
Дата | |
Msg-id | CAKFQuwZ7Uj5grF62CnAe7fUuSOJ5jtbNugj5DWcR3zoOmA27EA@mail.gmail.com обсуждение исходный текст |
Ответ на | byte-size of column values (Dominique Devienne <ddevienne@gmail.com>) |
Ответы |
Re: byte-size of column values
|
Список | pgsql-general |
On Tue, Oct 18, 2022 at 8:53 AM Dominique Devienne <ddevienne@gmail.com> wrote:
Hi. I'm surprised by the result for bit(3) and char, when calling
pg_column_size().
Why 6, instead of 1? The doc does mention 5-8 bytes overhead, but I
expected those for varying bit, not fixed-sized bit typed values. How
come?
The base type is what matters, if the length of the actual type is a parameter (the (n) part) the underlying type must be variable, and thus has a component that says how long the actually stored value is.
How does one store as compactedly as possible several small enums, on
millions of rows?
int2
David J.
p.s., pretend char doesn't even exist.
В списке pgsql-general по дате отправления: