Re: Performance implications of 8K pread()s

2023-07-11 Thread Thomas Munro
On Wed, Jul 12, 2023 at 5:12 AM Thomas Munro wrote: > "gathering" (Oops, for reads, that's "scattering". As in scatter/gather I/O but I picked the wrong one...).

Re: Performance implications of 8K pread()s

2023-07-11 Thread Thomas Munro
On Wed, Jul 12, 2023 at 1:11 AM Dimitrios Apostolou wrote: > Note that I suspect my setup being related, (btrfs compression behaving > suboptimally) since the raw device can give me up to 1GB/s rate. It is however > evident that reading in bigger chunks would mitigate such setup > inefficiencies.

Entire index scanned, but only when in SQL function?

2023-07-11 Thread Philip Semanchuk
Hi there, I’m on Postgres 13.11 and I'm seeing a situation where an INSERT...SELECT statement seq scans an index, but only when wrapped in a SQL function. When invoked directly (via psql) or when called via a PL/pgSQL function, it only reads the index tuples it needs, resulting in much better pe

Performance implications of 8K pread()s

2023-07-11 Thread Dimitrios Apostolou
Hello list, I have noticed that the performance during a SELECT COUNT(*) command is much slower than what the device can provide. Parallel workers improve the situation but for simplicity's sake, I disable parallelism for my measurements here by setting max_parallel_workers_per_gather to 0. Stra