Re: fixed-length row
От | Martijn van Oosterhout |
---|---|
Тема | Re: fixed-length row |
Дата | |
Msg-id | 20040115211502.GA26587@svana.org обсуждение исходный текст |
Ответ на | fixed-length row (David Garamond <lists@zara.6.isreserved.com>) |
Ответы |
Re: fixed-length row
|
Список | pgsql-general |
On Thu, Jan 15, 2004 at 09:17:55PM +0700, David Garamond wrote: > 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). Just remember that there are no fixed length string types. Your assumption that char(M) = M bytes is wrong. M characters can take essentially any length in bytes depending on the encoding. Storing strings as CHAR a field takes the same amount of space as in a VARCHAR or TEXT field. The only difference is in the contraint checking on insert and the handling of trailing spaces. That said, somewhere in the pg_attriute table is a column that says the size in bytes or variable. -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > (... have gone from d-i being barely usable even by its developers > anywhere, to being about 20% done. Sweet. And the last 80% usually takes > 20% of the time, too, right?) -- Anthony Towns, debian-devel-announce
Вложения
В списке pgsql-general по дате отправления: