performance cost for varchar(20), varchar(255), and text

Поиск
Список
Период
Сортировка
От Jessica Richard
Тема performance cost for varchar(20), varchar(255), and text
Дата
Msg-id 801541.60585.qm@web56406.mail.re3.yahoo.com
обсуждение исходный текст
Ответы Re: performance cost for varchar(20), varchar(255), and text  (Shane Ambler <pgsql@Sheeky.Biz>)
Re: performance cost for varchar(20), varchar(255), and text  (Lew <lew@lwsc.ehost-services.com>)
Список pgsql-admin
I am tuning a database created by someone else.

I noticed that some column lengths were defined longer than needed.

For example, an Id column is holding a stand length of 20 characters but was defined as varchar(255).

On some other columns, for example, a Description column is supposed to hold less than 100 characters but defined as text.

I am trying to understand the performance impact if a column is over defined in the following cases:

1. char(20) vs varchar(20)

2. varchar(20) vs varchar(255)

3. varchar(255) vs text


thanks,
Jessica

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

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: How many table scans in a delete...
Следующее
От: Shane Ambler
Дата:
Сообщение: Re: performance cost for varchar(20), varchar(255), and text