| От | Tom Lane |
|---|---|
| Тема | Re: Question on simulating Enum Data type |
| Дата | |
| Msg-id | 12537.1111207118@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Question on simulating Enum Data type ("Morgan Kita" <mkita@verseon.com>) |
| Список | pgsql-novice |
"Morgan Kita" <mkita@verseon.com> writes:
> Hmm still I wonder, won't the varchar/char compares be much slower
> than using a seperate map table, grabbing the int value, and then only
> doing int compares?
Certainly a string compare is slower than an integer compare, but you
have to consider the context. In database work what usually counts more
than any CPU effort is the amount of disk I/O --- and that means that
adding a table join to avoid a string compare is being penny-wise
and pound-foolish.
It'd be well worth your while to set up a few experimental comparisons
to see how this plays out in practice. Either answer *could* be right
depending on your situation.
regards, tom lane
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера