Re: patch submission: truncate trailing nulls from heap rows to reduce the size of the null bitmap
От | Simon Riggs |
---|---|
Тема | Re: patch submission: truncate trailing nulls from heap rows to reduce the size of the null bitmap |
Дата | |
Msg-id | CA+U5nM+SFM75b8ozCBT8HSrCT05mw1ZOBe0W83mc2-t0nzUq0Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: patch submission: truncate trailing nulls from heap rows to reduce the size of the null bitmap (Josh Berkus <josh@agliodbs.com>) |
Список | pgsql-hackers |
On Fri, Apr 27, 2012 at 1:51 AM, Josh Berkus <josh@agliodbs.com> wrote: > Now, the other issue I'd be worried about for this optimization is what > happens when the nulls become non-trailing? For example, this pattern: > > 1. Out of 700 columns, columns 301+ are all Null, so we map them away. > 2. User updates column 688 to non-null > 3. Suddenly we have a MUCH larger row which will no longer fit on the page. > > If your application had a lot of that kind of update pattern, I'd be > concerned that this would be a deoptimzation. Currently, we have a long row before and a long row after. Jamie's proposals would give us a short row before and a long row after. Since we don't ever update in place, we're much more likely to fit on the same page with this optimisation than without it. I guess we can check that with a performance test. (Perhaps a more obvious optimisation would be to use a compressed NULL bitmap. That would respond better in a wider range of use cases than just truncation of trailing zeroes.) -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: