Re: parallel-processing multiple similar query tasks - any example? - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: parallel-processing multiple similar query tasks - any example?
Date
Msg-id 202204281610.turgxp6amrah@alvherre.pgsql
Whole thread Raw
In response to Re: parallel-processing multiple similar query tasks - any example?  (Shaozhong SHI <shishaozhong@gmail.com>)
Responses Re: parallel-processing multiple similar query tasks - any example?  (Shaozhong SHI <shishaozhong@gmail.com>)
List pgsql-general
On 2022-Apr-28, Shaozhong SHI wrote:

> Why sleep(1)?

It is sleeping to show that they are running concurrently.  If it runs
five sleeps of one second each and the whole command lasts one second,
then all sleeps ran in parallel.  Had the whole command taken five
seconds, you would know that the queries ran serially.

> It should be all active - doing work concurrently.

They are all active simultaneously.  You just need to supply your own
query, without any sleeps.

-- 
Álvaro Herrera



pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: ERROR: cursor variable must be a simple variable (LINE XX: OPEN vQuery.cursorReturn FOR )
Next
From: Adrian Klaver
Date:
Subject: Re: Backing up a DB excluding certain tables