| От | 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
|
| Список | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера