Re: Fixed width rows faster?

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Fixed width rows faster?
Дата
Msg-id 200403051528.55578.josh@agliodbs.com
обсуждение исходный текст
Ответ на Re: Fixed width rows faster?  (Bill Moran <wmoran@potentialtech.com>)
Ответы Re: Fixed width rows faster?
Список pgsql-performance
Jeff, Bill:

> No.  The user docs state that the performance is equal for char, varchar
> and text.

Actually, CHAR is slightly *slower* than VARCHAR or TEXT for SELECTs in many
applications.   This is becuase of the field padding, and the frequent
necessity of casting CHAR::TEXT and back.

For INSERT and UPDATE, TEXT is the fastest becuase it's not checking a length
constraint (takes time) or padding the field out to the required CHAR length
(even more time).

Frankly, the only reason to use anything other than TEXT is compatibility with
other databases and applications.


--
-Josh Berkus
 Aglio Database Solutions
 San Francisco


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

Предыдущее
От: Dennis Bjorklund
Дата:
Сообщение: Re: Fixed width rows faster?
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Fixed width rows faster?