Re: CHAR vs NVARCHAR vs TEXT performance

Поиск
Список
Период
Сортировка
От Steve Crawford
Тема Re: CHAR vs NVARCHAR vs TEXT performance
Дата
Msg-id CAEfWYyymHG+if1CjK6FRvv7putXbXNUn6pVPp+VZfbzGdzyVng@mail.gmail.com
обсуждение исходный текст
Ответ на Re: CHAR vs NVARCHAR vs TEXT performance  (Rob <postgresql@mintsoft.net>)
Список pgsql-hackers

> On Tue, Apr 30, 2019 at 5:44 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> FWIW, my recommendation for this sort of thing is almost always
>> to not use CHAR(n).  The use-case for that datatype pretty much
>> disappeared with the last IBM Model 029 card punch.
...



Perhaps the "tip" on the character datatype page (https://www.postgresql.org/docs/11/datatype-character.html) should be updated as the statement "There is no performance difference among these three types..." could easily lead a reader down the wrong path. The statement may be true if one assumes the planner is able to make an optimal choice but clearly there are cases that prevent that. If the situation is better explained elsewhere in the documentation then just a link to that explanation may be all that is needed.

Cheers,
Steve 

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: ERROR: failed to add item to the index page
Следующее
От: Tom Lane
Дата:
Сообщение: Re: REINDEX INDEX results in a crash for an index of pg_class since 9.6