| От | David Link |
|---|---|
| Тема | Re: Integer keys vs. Varchar keys |
| Дата | |
| Msg-id | 3C081338.AC471B69@soundscan.com обсуждение исходный текст |
| Ответ на | Integer keys vs. Varchar keys (David Link <dlink@soundscan.com>) |
| Список | pgsql-general |
Tom Lane wrote: > > David Link <dlink@soundscan.com> writes: > > What performance gains would an integer primary key have over a varchar > > primary key, for table joins? > > The comparison operation itself would surely be faster for integers, but > that would probably be swamped out by disk access and other overhead. > What I'd expect is that any measurable difference would come from more > I/O required due to physical increase in the table and index sizes, > because of larger field sizes in the varchar case. Since you didn't say > how long your varchar keys might be, it's anyone's guess what the > differential will be. varchar(12). An alpha numeric UPC code. Thanks for the information, David
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера