Re: parallel-processing multiple similar query tasks - any example?
Shaozhong SHI <shishaozhong@gmail.com>
From: Shaozhong SHI <shishaozhong@gmail.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Date: 2022-04-28T16:17:04Z
Lists: pgsql-general
Expand and explain please. Regards, David On Thursday, 28 April 2022, Alvaro Herrera <alvherre@alvh.no-ip.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 >