public inbox for [email protected]  
help / color / mirror / Atom feed
From: Steve Midgley <[email protected]>
To: Shaozhong SHI <[email protected]>
Cc: pgsql-sql <[email protected]>
Subject: Re: How best to do parallel query given tens of thousands of iteration of a loop of recursive queries?
Date: Sun, 10 Apr 2022 09:03:04 -0700
Message-ID: <CAJexoS+mG=4AKfjAb0+i5DKhHB_8qSxZz3g5Ny+MZirGBj7Vdg@mail.gmail.com> (raw)
In-Reply-To: <CA+i5JwYMZ_eUtbdGBX9vg2GQzpTLo9m+bMoW1wniEqVv5sxV-w@mail.gmail.com>
References: <CA+i5JwYMZ_eUtbdGBX9vg2GQzpTLo9m+bMoW1wniEqVv5sxV-w@mail.gmail.com>

On Sun, Apr 10, 2022, 6:50 AM Shaozhong SHI <[email protected]> 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


view thread (3+ messages)  latest in thread

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], [email protected]
  Subject: Re: How best to do parallel query given tens of thousands of iteration of a loop of recursive queries?
  In-Reply-To: <CAJexoS+mG=4AKfjAb0+i5DKhHB_8qSxZz3g5Ny+MZirGBj7Vdg@mail.gmail.com>

* 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