Re: Reduce TupleHashEntryData struct size by half

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Reduce TupleHashEntryData struct size by half
Дата
Msg-id 1cc3b400a0e8eead18ff967436fa9e42c0c14cfb.camel@j-davis.com
обсуждение исходный текст
Ответ на Re: Reduce TupleHashEntryData struct size by half  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: Reduce TupleHashEntryData struct size by half
Список pgsql-hackers
On Tue, 2025-03-04 at 17:28 -0800, Jeff Davis wrote:
> My results (with wide tables):
>
>                         GROUP BY      EXCEPT
>    master:                  2151        1732
>    entire v8 series:        2054        1740

I'm not sure what I did with the EXCEPT test, above, perhaps I had
filled the test table twice by mistake or something?

New numbers below:

Data:

  create table c (a int not null);
  insert into c select a from generate_Series(1,1000) a;

  create table big(i int, j int);
  insert into big select g, 1 from generate_series(1,10000000) g;

  create table wide (t text not null);
  insert into wide
    select repeat(md5(a::text),10)
    from generate_Series(1,1000) a;

  create table wide_copy (t text not null);
  insert into wide_copy select * from wide;

  vacuum freeze analyze;


Results:

              c(tps) wide(tps) except(tps)  big(ms)  big(MiB)

91ecb5e0bc     4768      2091        2317     3853       768
master         4942      2063        2323     3831       768
0001           4932      2038        2361     3712       616
0002           4601      2034        2365     3753       616
0003           4850      2040        2418     3749       616
0004           4744      2065        2282     3665       488
0005           4630      1994        2307     3665       488
0006           4809      2063        2394     3646       488
0007           4752      2070        2479     3659       488

Note: c.sql, wide.sql, and except.sql are measured in tps, higher is
better. big.sql is measured in ms and MiB, lower is better.

For some reason I'm getting a decline of about 3% in the c.sql test
that seems to be associated with the accessor functions, even when
inlined. I'm also not seeing as much benefit from the inlining of the
MemoryContextMemAllocated(). But these mixed test results are minor
compared with the memory savings of 35% and the more consistently-
improved performance of 5% on the larger test (which is also integers),
so I plan to commit it.

Regards,
    Jeff Davis


Вложения

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