| От | Tomasz Myrta |
|---|---|
| Тема | Re: which type for primary key? |
| Дата | |
| Msg-id | 3E48D694.4050702@klaster.net обсуждение исходный текст |
| Ответ на | which type for primary key? (Rafal Kedziorski <rafcio@polonium.de>) |
| Список | pgsql-sql |
Rafal Kedziorski wrote: > Hi, > > I'm working on J2EE project with PostgreSQL (7.3.2). I know, that a > number type is better for primary key as string. I want create primary > keys as NUMBER(20). Is this a good idea? what will be a performance for > this length? Postgresql documentation 5.1.2: "However, the numeric type is very slow compared to the floating-point types described in the next section" I'm not sure, but number(20) is 10 or 20 bytes length (you need to check this), which is rather long variable for primary key. I use always int4 or int8 for primary keys when possible. Regards, Tomasz Myrta
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера