public inbox for [email protected]  
help / color / mirror / Atom feed
From: Marc SCHAEFER <[email protected]>
To: [email protected]
Subject: Re: Naive question about multithreading/multicore
Date: Mon, 14 Oct 2024 09:30:07 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+hUKG+bjgdh7APFCC_8cZKnMzeagYjiEqTp+qn2koafGmi1aQ@mail.gmail.com>
References: <[email protected]>
	<CA+hUKG+bjgdh7APFCC_8cZKnMzeagYjiEqTp+qn2koafGmi1aQ@mail.gmail.com>

Hello,

On Sun, Oct 13, 2024 at 08:16:04AM +1300, Thomas Munro wrote:
> > template1=> SELECT COUNT(*) FROM pg_class a, pg_class b, pg_class c;
> >
> > I see only one 100% CPU PostgreSQL process.
> 
> If you set set min_parallel_table_scan_size = 0 then it uses

Without it, it uses one CPU and takes about 8.5 s (count is 57512456).

With it, it is indeed parallel (multiple CPU used) and it takes about 6s.

As this is on a machine with slow disks, it is perfectly ok, I just
wanted to see the CPU parallelism in action.

Thank you!






view thread (3+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Naive question about multithreading/multicore
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox