Re: Yet another fast GiST build (typo)

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>, Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Erik Rijkers <er(at)xs4all(dot)nl>, Michael Paquier <michael(at)paquier(dot)xyz>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Darafei Komяpa Praliaskouski <me(at)komzpa(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Yet another fast GiST build (typo)
Date: 2020-09-03 18:40:07
Message-ID: fa65c957-04f7-67c1-9232-bdef094e96fd@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 30/08/2020 15:04, Andrey M. Borodin wrote:
>> 23 авг. 2020 г., в 14:39, Andrey M. Borodin <x4mmm(at)yandex-team(dot)ru> написал(а):
>>
>> Thanks for reviewing and benchmarking, Pavel!
>
> Pavel sent me few typos offlist. PFA v12 fixing these typos.

In gist_indexsortbuild(), you first build all the leaf pages. Then, you
read through all the index pages you just built, to form the tuples for
the next level, and repeat for all the upper levels. That seems
inefficient, it would be more better to form the tuples for the
downlinks as you go, when you build the leaf pages in the first place.
That's how nbtsort.c works. Also, you could WAL-log the pages as you go.

In gist_indexsortbuild_flush(), can't you just memcpy() the page from
memory to the buffer?

- Heikki

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Anastasia Lubennikova 2020-09-03 19:02:58 Re: 回复:how to create index concurrently on partitioned table
Previous Message Tom Lane 2020-09-03 18:35:43 Re: Creating foreign key on partitioned table is too slow