From: | Alexander Okulovich <aokulovich(at)stiltsoft(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Postgres 15 SELECT query doesn't use index under RLS |
Date: | 2023-10-26 13:47:03 |
Message-ID: | e9d503cb-efeb-43d3-952e-f517e4d24302@stiltsoft.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Hi Tom,
I've attempted to reproduce this on my PC in Docker from the stage
database dump, but no luck. The first query execution on Postgres 15
behaves like on the real stage, but subsequent ones use the index. Also,
they execute much faster. Looks like the hardware and(or) the data
structure on disk matters.
Here is the Docker Compose sample config:
> version:'2.4' services:
> database-15:
> image: postgres:15.4
> ports:
> -"7300:5432" environment:
> POSTGRES_DB: stage_db
> POSTGRES_USER: stage
> POSTGRES_PASSWORD: stage
> volumes:
> -"./init.sql:/docker-entrypoint-initdb.d/init.sql" -"./pgdb/aws-15:/var/lib/postgresql/data" mem_limit: 512M
> cpus: 2
> blkio_config:
> device_read_bps:
> -path: /dev/nvme0n1
> rate:'10mb' device_read_iops:
> -path: /dev/nvme0n1
> rate: 2000
> device_write_bps:
> -path: /dev/nvme0n1
> rate:'10mb' device_write_iops:
> -path: /dev/nvme0n1
> rate: 2000
I performed tests only with CPU and memory limits. If I try to limit the
disk(blkio_config), my system hangs on container startup after a while.
Could you please share your thoughts on how to create such a
self-contained test case.
Kind regards,
Alexander
On 18.10.2023 22:35, Tom Lane wrote:
> If you could provide a self-contained test case that performs 10x
> worse under v15 than v12, we'd surely take a look at it. But with the
> information you've given so far, little is possible beyond speculation.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2023-10-26 14:09:37 | Re: Postgres 15 SELECT query doesn't use index under RLS |
Previous Message | Jeff Janes | 2023-10-23 14:05:01 | Re: GIN JSONB path index is not always used |