AW: BUG #18205: Performance regression with NOT NULL checks.

Поиск
Список
Период
Сортировка
От Daniel Migowski
Тема AW: BUG #18205: Performance regression with NOT NULL checks.
Дата
Msg-id 41ED3F5450C90F4D8381BC4D8DF6BBDC017401633A@EXCHANGESERVER.ikoffice.de
обсуждение исходный текст
Ответ на Re: BUG #18205: Performance regression with NOT NULL checks.  (Andres Freund <andres@anarazel.de>)
Список pgsql-bugs
Hello Andres,

Half of them are null in average, 30% are even not null. The test case I sent you was artificial to show the problem,
butit's the same slower behaviour when I fill all the columns with values except the one in the where clause.  

Greeting,
Daniel

-----Ursprüngliche Nachricht-----
Von: Andres Freund <andres@anarazel.de>
Gesendet: Sonntag, 19. November 2023 23:18
An: Daniel Migowski <dmigowski@ikoffice.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-bugs@lists.postgresql.org
Betreff: Re: BUG #18205: Performance regression with NOT NULL checks.

Hi,

On 2023-11-19 21:15:37 +0000, Daniel Migowski wrote:
> Thank you for the detailed explanation. It surely has a reason to
> remove the previously used short-circuit in slot_getattr, at least in
> the special case when we

The short-circuit in slot_getattr() still exists, we just don't reach it in this case.


> And yes, in my real world use case which I tried to understand I have
> a wide table with 81 columns, and I am using column 1,43,18,75 and
> filter by attribute 82,42, and 24.

Are most of the columns NULL or not?


> Don't know how to handle this, maybe I should rework the layout of all
> my tables and move the mostly used columns to the beginning.

It might also be worth to split the table into multiple tables and join when necessary. Independent of this issue,
relativelywide tuples, where you don't use most of the columns, will cause unnecessary IO. 

Greetings,

Andres



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: B-tree Index corruption
Следующее
От: Daniel Migowski
Дата:
Сообщение: AW: BUG #18205: Performance regression with NOT NULL checks.