Re: How best to do parallel query given tens of thousands of iteration of a loop of recursive queries?

From: Steve Midgley <science(at)misuse(dot)org>
To: Shaozhong SHI <shishaozhong(at)gmail(dot)com>
Cc: pgsql-sql <pgsql-sql(at)lists(dot)postgresql(dot)org>
Subject: Re: How best to do parallel query given tens of thousands of iteration of a loop of recursive queries?
Date: 2022-04-10 16:03:04
Message-ID: CAJexoS+mG=4AKfjAb0+i5DKhHB_8qSxZz3g5Ny+MZirGBj7Vdg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Sun, Apr 10, 2022, 6:50 AM Shaozhong SHI <shishaozhong(at)gmail(dot)com> wrote:

> There is a plpgsql script that have a loop to carry out the same recursive
> queries.
>
> The estimation of iteration is in the order of tens of thousands.
>
> What is the best way of making using parallel query strategy.
>
> Any examples?
>

Can you provide some sample ddl, data and sql to illustrate your question?

You mention in one place "iteration" and "parallel" but in another you
mention recursion.. Recursion (by definition?) involves pushing state data
forward into each successive iteration.. Therefore you can't run recursion
in parallel.

If you can provide examples maybe we can see which if parallelism is a
possibility..

Steve

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message David G. Johnston 2022-04-10 16:13:14 Re: How best to do parallel query given tens of thousands of iteration of a loop of recursive queries?
Previous Message Shaozhong SHI 2022-04-10 13:50:32 How best to do parallel query given tens of thousands of iteration of a loop of recursive queries?