| From: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Add sortsupport to money_ops, pg_lsn_ops and xid8_ops |
| Date: | 2026-11-06 16:16:56 |
| Message-ID: | CALdSSPgxTQU0e_5xZm+Vj8ym8oAWafuEKRDCUSJWoRjjBGS81g@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
While benchmarking the effects of the recent (41467b1d88) GIN speedup,
I noticed that btree opclasses for money/pg_lsn/xid8 have no
sortsupport
I think this is a clear miss, so PFA
This can speedup CREATE INDEX on money type in ~20%, try
CREATE TABLE m AS SELECT (hashint8(i)::numeric/100)::money FROM
generate_series(1,1000000) i; create index on m (money ); -- 339ms
base vs 260ms patched for me
Also, ORDER BY col would also be faster. Maybe merge join will get
benefit - i didn't measure this
--
Best regards,
Kirill Reshke
| Attachment | Content-Type | Size |
|---|---|---|
| pg_lsn_money_xid8.diff | application/octet-stream | 1.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2026-11-06 16:24:39 | Re: Add sortsupport to money_ops, pg_lsn_ops and xid8_ops |
| Previous Message | Rafael Chacón | 2026-11-06 16:00:45 | Table synchronization cannot resume after a subscriber crash |