Re: Maximum size of the primary key

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Maximum size of the primary key
Дата
Msg-id 11291.1045258957@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Maximum size of the primary key  (jaanush@hot.ee (Jass))
Список pgsql-general
jaanush@hot.ee (Jass) writes:
> Is there a limit to the bytesize of the
> primary key? (I'm migrating from MySQL
> and there it was only 255).

btree index entries (primary key or not) are limited to 1/3 page, or
about 2700 bytes in a standard installation.  In the case of
compressible types like text or varchar, compression can be applied
first, so you'd probably find you could get away with field widths
up to 4k or so.  If you have entries wider than that, I'd begin to
question whether an index on the field really makes sense ...

            regards, tom lane

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

Предыдущее
От: Dennis Gearon
Дата:
Сообщение: Re: operators and bit field
Следующее
От: greg@turnstep.com
Дата:
Сообщение: Re: Broken idocs?