fixed-length row
| От | David Garamond |
|---|---|
| Тема | fixed-length row |
| Дата | |
| Msg-id | 4006A113.4070701@zara.6.isreserved.com обсуждение |
| Ответы |
Re: fixed-length row
Re: fixed-length row Re: fixed-length row |
| Список | pgsql-general |
The MySQL manual recommends that we create a "fixed-length row" if
possible, for speed (especially scanning speed). A fixed-length row is a
row which is comprised of only fixed-length fields. A fixed-length field
takes a fixed amount of bytes for storage (e.g. INT = 4 bytes, CHAR(M) =
M bytes, etc).
Is there a similar recommendation in PostgreSQL? I notice that most data
types are stored in variable-length mode anyway (is cidr and inet data
types fixed-length?)
Is there a command/query in psql which can show storage requirement for
each field? For example:
db1=# \d t1;
Table "public.t1"
Column | Type | Modifiers | Storage size
--------+-------------+-----------+--------------
id | inet | not null | 24
i | integer | | 4
c | varchar(10) | | variable
Indexes:
"t1_pkey" primary key, btree (id)
--
dave
В списке pgsql-general по дате отправления: