| От | Tom Lane |
|---|---|
| Тема | Re: Why are tables sizes so big? |
| Дата | |
| Msg-id | 9480.983979766@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Why are tables sizes so big? (Richard Huxton <dev@archonet.com>) |
| Список | pgsql-general |
Richard Huxton <dev@archonet.com> writes:
>> The CSV file has 5 text fields that I change to char size 10, float, float,
>> int and float. That in it's self sould make the data on the server much
>> smaller, but it is not, it is bigger, why?
> char = 10 + 4
> floats= 8 * 3
> int = 4
> oid = 4
> That's at least 46 bytes per row plus indexes - which can take up a lot.
Actually, the per-row overhead is not just an OID: there are several
other system fields too. On a typical machine it's going to be 32 bytes
not four. Possibly more if you have nulls in the row; see
src/include/access/htup.h if you're interested.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера