| From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
|---|---|
| To: | Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> |
| Cc: | Greg Burd <greg(at)burd(dot)me>, KAZAR Ayoub <ma_kazar(at)esi(dot)dz>, Neil Conway <neil(dot)conway(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Shinya Kato <shinya11(dot)kato(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Speed up COPY FROM text/CSV parsing using SIMD |
| Date: | 2026-09-08 15:24:59 |
| Message-ID: | aqAoyyC1Qlx62KQ0@nathan |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Sep 08, 2026 at 01:11:00PM +0300, Nazir Bilal Yavuz wrote:
> Here is an attempt to solve this problem. I ran Manni's script and saw
> a 1-2% slowdown on TEXT-wide inputs. It is still faster compared to
> the version without the SIMD patch; the slowdown is relative to the
> current master branch (which includes the SIMD patch).
Thanks for reporting. Fable 5.1 suggests moving the check to
CopyLoadInputBuf() to avoid this small regression, which makes sense to me.
I've attached a new patch that does that. This is definitely a bit of
hack, and I'm assuming we'll need to revisit this if we want to re-attempt
more sophisticated heuristics for when to use the SIMD path. But IMHO this
is self-contained enough to be reasonable for v19.
--
nathan
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-Fix-hangs-in-COPY-FROM-FORMAT-text.patch | text/plain | 3.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Geier | 2026-09-08 15:30:29 | Re: Reducing relcache memory usage: deduping index shapes |
| Previous Message | Rui Zhao | 2026-09-08 15:19:18 | Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements |