Re: Experimenting with hash join prefetch - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: Experimenting with hash join prefetch
Date
Msg-id 2EB14DC6-8F68-4FF3-A526-60F9D3C77E58@yandex-team.ru
Whole thread Raw
In response to Experimenting with hash join prefetch  (Thomas Munro <thomas.munro@enterprisedb.com>)
Responses Re: Experimenting with hash join prefetch  (Dmitry Dolgov <9erthalion6@gmail.com>)
Re: Experimenting with hash join prefetch  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-hackers
Hi, Thomas!
> 14 окт. 2018 г., в 9:18, Thomas Munro <thomas.munro@enterprisedb.com> написал(а):
>
> +               /* Prefetch the bucket for the next key */
> +               uint32 next_hash = hash_uint32(DatumGetInt32(keyval) + 1);
> +               uint32 next_bucket = next_hash % hashtable->nbuckets;
> +               __builtin_prefetch(&hashtable->buckets.unshared[next_bucket]);


+1, I also think that we should use __builtin_prefetch these days (years, actually).
Exactly after listening Anastassia Ailamaki's (author of referenced paper) talk on VLDB I've proposed to do that for
B-tree[0], but did not really pursuit that idea. 

[0] https://www.postgresql.org/message-id/3B774C9E-01E8-46A7-9642-7830DC1108F1%40yandex-team.ru

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Experimenting with hash join prefetch
Next
From: Andrey Borodin
Date:
Subject: Re: B-tree cache prefetches