Re: [HACKERS] Small improvement to compactify_tuples - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Small improvement to compactify_tuples
Date
Msg-id 22996.1510160560@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Small improvement to compactify_tuples  (Claudio Freire <klaussfreire@gmail.com>)
Responses Re: [HACKERS] Small improvement to compactify_tuples
Re: [HACKERS] Small improvement to compactify_tuples
List pgsql-hackers
Claudio Freire <klaussfreire@gmail.com> writes:
> What's perhaps not clear is whether there are better ideas. Like
> rebuilding the page as Tom proposes, which doesn't seem like a bad
> idea. Bucket sort already is O(bytes), just as memcopy, only it has a
> lower constant factor (it's bytes/256 in the original patch), which
> might make copying the whole page an extra time lose against bucket
> sort in a few cases.

> Deciding that last point does need more benchmarking. That doesn't
> mean the other improvements can't be pursued in the meanwhile, right?

Well, I doubt we're going to end up committing more than one of these
ideas.  The question is which way is best.  If people are willing to
put in the work to test all of them, let's do it.

BTW, it strikes me that in considering the rebuild-the-page approach,
we should not have blinders on and just measure the speed of
PageRepairFragmentation.  Rather, we should take a look at what happens
subsequently given a physically-ordered set of tuples.  I can recall
Andres or someone moaning awhile ago about lack of locality of access in
index page searches --- maybe applying that approach while vacuuming
indexes will help?
        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] taking stdbool.h into use
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] SQL procedures