Re: Unexpected table size usage for small composite arrays
От | Erik Sjoblom |
---|---|
Тема | Re: Unexpected table size usage for small composite arrays |
Дата | |
Msg-id | CAAW=00VALqjxtn4h368tYJ2HrNxebnZJNPbcO+Anm1HrRfnn-g@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Unexpected table size usage for small composite arrays (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Unexpected table size usage for small composite arrays
|
Список | pgsql-hackers |
I hear what you are saying Tom and what I have read says that it would take 24 + 12 x N bytes for the array. This isn't the case when I start adding elements to the table. Here are some samples adding 10,000 rows with difference elements in the composite array:
Row count | Array elements | Main table size | TOAST | Bytes / Row | Bytes / Entry |
---|---|---|---|---|---|
10000 | 0 | 933888 | 8192 | 93 | 0.0 |
10000 | 1 | 1417216 | 8192 | 142 | 49.0 |
10000 | 2 | 1826816 | 8192 | 183 | 45.0 |
10000 | 3 | 2220032 | 8192 | 222 | 43.0 |
10000 | 5 | 3039232 | 8192 | 304 | 42.2 |
10000 | 10 | 5120000 | 8192 | 512 | 41.9 |
10000 | 100 | 10240000 | 8192 | 1024 | 9.3 |
10000 | 200 | 20480000 | 8192 | 2048 | 9.8 |
10000 | 400 | 1015808 | 41467904 | 4248 | 10.4 |
10000 | 1000 | 1015808 | 87080960 | 8810 | 8.7 |
On Tue, Oct 22, 2024 at 6:50 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Erik Sjoblom <sjoblom65@gmail.com> writes:
> I don't see why it's using 50 bytes per element. There should be just one
> 24 byte header for the array, not one per element
[ shrug... ] I just told you that's not so.
regards, tom lane
В списке pgsql-hackers по дате отправления: