Size comparison between a Composite type and an equivalent Text field
В списке pgsql-general по дате отправления:
| От | denis@edistar.com |
|---|---|
| Тема | Size comparison between a Composite type and an equivalent Text field |
| Дата | |
| Msg-id | 44042B7C.9090403@edistar.com обсуждение исходный текст |
| Ответы |
Re: Size comparison between a Composite type and an
|
| Список | pgsql-general |
I need to store very large integers (more of 30 digits). I found two solutions to this problem: - using a text field - splitting the integer into 2 parts and then storing them in a composite type with 2 bigint fields The definitive choice will depend on the disk space used by one solution instead of the other. I think the storage size of the text field will be the number of the digits plus some extra data for the structure of the text type. For the composite type the size will be of 2*8 bytes plus the extra data for maintaning the structure of the type. For example if i have an integer of 30 digits: Text Field 30 bytes + sizeof(text data structure) Composite type 8 bytes + sizeof(composite data structure) What of the two data structures (text or composite) will use more disk space? Thank you, -- Doct. Eng. Denis Gasparin --------------------------- Edistar srl
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера