Re: Datatype sizes; a space and speed issue?

Поиск
Список
Период
Сортировка
От Vams
Тема Re: Datatype sizes; a space and speed issue?
Дата
Msg-id 200406230000.58883.vmudrageda@charter.net
обсуждение исходный текст
Ответ на Datatype sizes; a space and speed issue?  (Madison Kelly <linux@alteeve.com>)
Ответы Re: Datatype sizes; a space and speed issue?  (Madison Kelly <linux@alteeve.com>)
Список pgsql-general
On Tuesday 22 June 2004 11:26 pm, Madison Kelly wrote:
>    Something I have been wondering about and haven't found an answer to
> yet is how the size of a datatype (I hope that is the right term)
> effects performance. What effect is there if I specify "TEXT" instead of
> say "VARCHAR(255)"? How much benefit is there do being more aggresive
> and say cutting it in half again by using "VARCHAR(128)"?

There is no performance difference between varchar, char and text.  Infact,
text is equal to varchar with no length specified (a Postgresql extension).

I use varchar when I want a max limit on the number of characters.  Char when
I want a set number of characters (auto space padded).  And use text all
other times, because it is more readable than varchar.

All this and more can be found in the Docs - 7.4.2: Ch 8: Data Types, Sec 8.3:
Character Types.

good luck,

  Vams

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

Предыдущее
От: mike g
Дата:
Сообщение: Re: incremental backups?
Следующее
От: Joel Matthew
Дата:
Сообщение: Re: Datatype sizes; a space and speed issue?