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 countArray elementsMain table sizeTOASTBytes / RowBytes / Entry
1000009338888192930.0
1000011417216819214249.0
1000021826816819218345.0
1000032220032819222243.0
1000053039232819230442.2
10000105120000819251241.9
1000010010240000819210249.3
1000020020480000819220489.8
10000400101580841467904424810.4
10000100010158088708096088108.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 по дате отправления: