Re: Slow query fixed by replacing equality with a nested query

2022-01-20 Thread Michael Lewis
I don't see any reference to cte1. Is that expected? I'm unclear why these sets are not just inner join'd on resource_surrogate_id. It seems like that column it is being selected as Sid1 in each CTE, and then the next one does the below. Why? where resource_surrogate_id IN (SELECT Sid1 FROM cte_p

Re: PostgreSQL and Linux CPU's

2022-01-20 Thread David G. Johnston
On Thu, Jan 20, 2022 at 4:22 PM Sbob wrote: > I am looking for information on how PostgreSQL leverages or interfaces > with CPU's on Linux. Does PostgreSQL let Linux do the work? Does it > bypass the OS? Any information or docs you can send my way would be much > appreciated. > > PostgreSQL is a

PostgreSQL and Linux CPU's

2022-01-20 Thread Sbob
All; I am looking for information on how PostgreSQL leverages or interfaces with CPU's on Linux. Does PostgreSQL let Linux do the work? Does it bypass the OS? Any information or docs you can send my way would be much appreciated. Thanks in advance

Poor performance PostgreSQL 13/ PostGIS 3.x

2022-01-20 Thread Lugosi, Jim
Hi folks, We are struggling to figure out what is going on. We are migrating from PostgreSQL 9.6 to PostgreSQL 13 w/ PostGIS. Our 9.6 version was compiled from source and the new version (13) was installed using Yum. BTW, the new version is on a VM that has 16GB of memory, two cores, and 500 GB

Slow query fixed by replacing equality with a nested query

2022-01-20 Thread Valentin Janeiko
Hi everyone, I have a SELECT query that uses a chain of CTEs (4) that is slow to run on a large database. But if I change a where clause in one of the small CTEs from an equality to an equivalent nested IN query, then the query becomes fast. Looking at the query plan I can see that after the chang

RE: PostgreSQL 12.8 Same Query Same Execution Plan Different Time

2022-01-20 Thread Michel SALAIS
Michel SALAIS De : David G. Johnston Envoyé : mercredi 19 janvier 2022 16:11 À : Ludwig Isaac Lim Cc : pgsql-performa...@postgresql.org Objet : Re: PostgreSQL 12.8 Same Query Same Execution Plan Different Time On Wed, Jan 19, 2022 at 7:59 AM Ludwig Isaac Lim mailto:ludz_...@yahoo.com> > wro