Re: parallel-processing multiple similar query tasks - any example?

From: Shaozhong SHI <shishaozhong(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: parallel-processing multiple similar query tasks - any example?
Date: 2022-04-28 16:17:04
Message-ID: CA+i5JwaRZZZPkpaOtvVOCjLzjwhL0pMrpXGKa8M7Qrr7zS5Mbg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Expand and explain please.
Regards,
David

On Thursday, 28 April 2022, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:

> 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
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2022-04-28 16:20:38 Re: parallel-processing multiple similar query tasks - any example?
Previous Message Tom Lane 2022-04-28 16:16:39 Re: ERROR: cursor variable must be a simple variable (LINE XX: OPEN vQuery.cursorReturn FOR )