Efficiency question: VARCHAR with empty string vs NULL

Поиск
Список
Период
Сортировка
От Doug Fields
Тема Efficiency question: VARCHAR with empty string vs NULL
Дата
Msg-id 5.1.0.14.2.20020524131720.02c09fa0@mail.pexicom.com
обсуждение исходный текст
Ответ на Re: MacOS X Shared Buffers (SHMMAX)?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Efficiency question: VARCHAR with empty string vs NULL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hello,

I have a table with about 15-20 VARCHAR items. I use VARCHAR on the
assumption that it is more space efficient and not too much slower than
CHAR, especially when you expect many of those VARCHAR to be null or empty
strings.

Is there a performance difference with VARCHAR elements of value NULL and
zero-length string? If so, can I assume that NULL is the better performer,
and thus re-code my INSERTS to replace empty strings with NULLs (or vice
versa)?

Now that I've had to re-write all my data to substring it to fit in the
VARCHARs, one more "thing" won't matter much.

Many Thanks,

Doug


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

Предыдущее
От: Darren Ferguson
Дата:
Сообщение: Re: Case Insensitive Data Type
Следующее
От: "Russell Black"
Дата:
Сообщение: Re: Case Insensitive Data Type