Re: CHAR or VARCHAR

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: CHAR or VARCHAR
Дата
Msg-id 19429.985554891@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: CHAR or VARCHAR  ("Peter J. Schoenster" <peter@schoenster.com>)
Ответы Re: CHAR or VARCHAR  ("Josh Berkus" <josh@agliodbs.com>)
Список pgsql-sql
"Peter J. Schoenster" <peter@schoenster.com> writes:
> On 22 Mar 2001, at 10:05, Tom Lane wrote:
>> There is *no* performance advantage of CHAR(n) over VARCHAR(n).

> I wonder if this question of char/varchar is postgresql specific or 
> rdbms in general.

It's definitely RDBMS-specific.  My comment applied to Postgres, which
stores CHAR(n) and VARCHAR(n) in essentially the same fashion --- it
doesn't really exploit the fact that CHAR(n) is fixed-size.  (Mainly
because it's *not* fixed size in PG, what with TOAST, multibyte, etc.)

On other DBMSes there could be a difference, especially if the DBMS has
performance problems with variable-length fields.
        regards, tom lane


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

Предыдущее
От: "Joe Conway"
Дата:
Сообщение: Re: Help
Следующее
От: Grant
Дата:
Сообщение: Re: Serials.