Re: Speeding up GIST index creation for hstore

From: Roman Khapov <rkhapov(at)yandex-team(dot)ru>
To: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Speeding up GIST index creation for hstore
Date: 2026-10-31 16:35:42
Message-ID: 73BE874A-4E61-403A-8304-AA35F2339CA4@yandex-team.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

Overall the patch looks correct and consistent
with how intarray, pg_trgm and ltree already
do it, so I have no objections on the approach.

>
> Index creating runtime goes from 1454.871- 1488.210 ms to 274.969 -
> 295.313 ms (about 6 times faster) (4 runs)
>

I benchmarked the patch too, on my ARM64 maxOS
machine I got next results:

baseline patched
CREATE INDEX ~392 ms ~233 ms (1.7x)

Index search shows no regressions (within noise).

Seems like the 6x number appears to be machine-dependent,
on my laptop the absolute time of the patched version similar
yours (~233 vs ~275-295 ms), but the baseline was 390ms rather
than 1450 ms, giving ~1.6-1.7x instead of 6x.

--
Best regards,
Roman Khapov

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-10-31 16:46:36 Re: ALTER COLLATION misses errcode
Previous Message Lukas Fittl 2026-10-31 16:30:47 Re: Stack-based tracking of per-node WAL/buffer usage