Re: memory layouts for binary search in nbtree - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: memory layouts for binary search in nbtree
Date
Msg-id CAM3SWZQdEaEsZ62NopHB0uuw=kAqQ8MMeCTCDYSAt8=oVGyy9w@mail.gmail.com
Whole thread Raw
In response to memory layouts for binary search in nbtree  (Andres Freund <andres@anarazel.de>)
Responses Re: [HACKERS] memory layouts for binary search in nbtree
List pgsql-hackers
On Wed, May 18, 2016 at 6:25 AM, Andres Freund <andres@anarazel.de> wrote:
> currently we IIRC use linearly sorted datums for the search in
> individual btree nodes.  Not surprisingly that's often one of the
> dominant entries in profiles. We could probably improve upon that by
> using an order more optimized for efficient binary search.

Did you ever try running a pgbench SELECT benchmark, having modified
things such that all PKs are on columns that are not of type
int4/int8, but rather are of type numeric? It's an interesting
experiment, that I've been meaning to re-run on a big box.

Obviously this will be slower than an equivalent plain pgbench SELECT,
but the difference may be smaller than you expect.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: memory layouts for binary search in nbtree
Next
From: Hao Lee
Date:
Subject: It's seems that the function "do_text_output_multiline" does not suit for format "line1\nline2\n...lineN".