Naive question about multithreading/multicore

From: Marc SCHAEFER <alphanet-postgresql-general(at)alphanet(dot)ch>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Naive question about multithreading/multicore
Date: 2024-10-12 17:30:58
Message-ID: ZwqyUjoXsrPg55vA@alphanet.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

on a machine where starting two processes:
perl -e 'while (1) { ; }'
I see two processed at 100% CPU, which is expected (with top).

Now, if I do:

template1=> SELECT COUNT(*) FROM pg_class a, pg_class b, pg_class c;

I see only one 100% CPU PostgreSQL process.

I read that while PostgreSQL connetions lead to a UNIX process model,
which is better for isolation, some operations have been parallelized
and can use more than one core/thread.

Maybe this specific case was not (yet?) parallelized, or should it
be and thus something is issing in my configuration?

Thank you.

PS: psql (13.16 (Debian 13.16-0+deb11u1))

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Koen De Groote 2024-10-12 18:32:04 Re: Foreign Data Wrapper behavior?
Previous Message Adrian Klaver 2024-10-12 16:02:37 Re: Questions about document "Concurrenry control" section