Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ndXxp-0001yc-F2 for pgsql-sql@arkaria.postgresql.org; Sun, 10 Apr 2022 13:50:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ndXxn-0005Ry-Cv for pgsql-sql@arkaria.postgresql.org; Sun, 10 Apr 2022 13:50:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ndXxn-0005RQ-0F for pgsql-sql@lists.postgresql.org; Sun, 10 Apr 2022 13:50:47 +0000 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ndXxk-0007lS-KQ for pgsql-sql@lists.postgresql.org; Sun, 10 Apr 2022 13:50:45 +0000 Received: by mail-ed1-x52b.google.com with SMTP id b15so15246436edn.4 for ; Sun, 10 Apr 2022 06:50:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=DDVoaHQgJERAGWBfea6l/Wpee01iDg+CrJRVMf4vi64=; b=OrJvax6+YoJ7PlmOPAg3xdGKP+F8gMxWZ7bik62Hbevub9YwtRZ6TbXNTAO2QceCnC 1gSmKPGkQMedfCQ5Q7yCDwGsVHoDdXBoaFVtMJYgzKJITJ7ziPsVivK2I5txHBSy9uwF qHpD6euZLtaGleFKM1jsG/ZHk+2FIYla+lAC4lm3xgeaYjymhBfqEM2hGuKDlJVQWV4V /xkOyfwWbEMlzKAnIrZNqMB1vkzfeeTcViRrgRbc/IHiC1dO0rsiQInXpDLGkA5VZx5o TKdvzkViZss5L0re7GZ2D0R68NBRE7sLJ0Ye0xV0HQmltNve7tqBsEl8n6tf+o8rpav8 AgrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=DDVoaHQgJERAGWBfea6l/Wpee01iDg+CrJRVMf4vi64=; b=bnUITFecH7zgrfbqeqWw5MlZzsGu7uwiwNcArzmS2B0I6ymMANw2rvB3iFMlRUOh8F cElfUTkLZwcEIzJPJ+mRfbGI0PD1dzFJeqcQAP9uStjdsNCE5W0uHfTsJXgdFECcjkHt Ua23O8mwaQIzeMaCAZLhj9OOs7hwA1OOax4s1auojDWCINz5OdviqxctvWNCWEihK18Z KXbpO+zlv2X6pomNODydvcIACZs+rr85LKc41F9DaW5GuMHbcV/JlVQwgtP29cUAswOh qYKl2fqLe2ZygEmKbiml3VJGLHYubyFTYWhTfAkBUnJxF39C28m/VIsUQ9Fl/MggUsg8 BUFw== X-Gm-Message-State: AOAM530tq+9BwDUi362YB/kYQspFNd8djOQXDql1uM4ENhfMLawKQcCs 1dhRV3QY1gtdFXZz366l/0AjsWn8iHzLr2v98OTAEKGO X-Google-Smtp-Source: ABdhPJxr2vgBIVJd5/NRbbDBOeteAWtK6Lwp6PPks6NVu9MiIRsyhMuRXoim3sC68Atzm01YrjUBBX6XfNaBnkCuwDA= X-Received: by 2002:aa7:de96:0:b0:418:f9ca:67f6 with SMTP id j22-20020aa7de96000000b00418f9ca67f6mr28821519edv.25.1649598642980; Sun, 10 Apr 2022 06:50:42 -0700 (PDT) MIME-Version: 1.0 From: Shaozhong SHI Date: Sun, 10 Apr 2022 14:50:32 +0100 Message-ID: Subject: How best to do parallel query given tens of thousands of iteration of a loop of recursive queries? To: pgsql-sql Content-Type: multipart/alternative; boundary="000000000000230ad405dc4d1d53" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000230ad405dc4d1d53 Content-Type: text/plain; charset="UTF-8" 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? Regards, David --000000000000230ad405dc4d1d53 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
There is a plpgsql script that have a loop to carry out th= e same recursive queries.

The estimation of iteration is= in the order of tens of thousands.

What is the be= st way of making using parallel query strategy.

An= y examples?

Regards,

Davi= d
--000000000000230ad405dc4d1d53--