Re: How are null's stored?

Поиск
Список
Период
Сортировка
Искать
От
Ryan
Тема
Re: How are null's stored?
Дата
в 16:53:10
Msg-id
10995.65.102.128.233.1052765883.squirrel@fordparts.com
Ответ на
Список
Дерево обсуждения
How are null's stored? "Jim C. Nasby" <jim@nasby.net>
Re: How are null's stored? Josh Berkus <josh@agliodbs.com>
Re: How are null's stored? "Ryan" <pgsql-performance@seahat.com>
Re: How are null's stored? Josh Berkus <josh@agliodbs.com>
Re: How are null's stored? Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: How are null's stored? Tom Lane <tgl@sss.pgh.pa.us>
Re: How are null's stored? Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: How are null's stored? Tom Lane <tgl@sss.pgh.pa.us>
Re: How are null's stored? Andrew Sullivan <andrew@libertyrms.info>
Re: How are null's stored? -- Some numbers "Jim C. Nasby" <jim@nasby.net>
> Jim,
>
>> I have a 40M row table I need to import data into, then use to create
>> a bunch of more normalized tables. Right now all fields are varchar,
>> but I'm going to change this so that fields that are less than a
>> certain size are just char. Question is, how much impact is there from
>> char being nullable vs. not nullable? src/include/access/htup.h
>> indicates that nulls are stored in a bitmap, so I'd suspect that I
>> should see a decent space savings from not having to include length
>> information all the time... (most of these small fields are always the
>> same size no matter what...)
>
> This is moot.   PostgreSQL stores CHAR(x), VARCHAR, and TEXT in the same
>  internal format, which includes length information in the page header.
>  So  you save no storage space by converting to CHAR(x) ... you might
> even make  your tables *larger* because of the space padding.

So if the internal format is identical, why does the INFERNAL database
ignore indexes when you have a text compared to a varchar?

Ryan

В списке pgsql-performance по дате отправления
От: Josh Berkus
Дата:
Сообщение: Re: How are null's stored?
От: Andrew Sullivan
Дата:
Сообщение: Re: How are null's stored?
FAQ