Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1spU3s-001mGD-9L for pgsql-general@arkaria.postgresql.org; Sat, 14 Sep 2024 14:47:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1spU3r-00EguE-Mc for pgsql-general@arkaria.postgresql.org; Sat, 14 Sep 2024 14:47:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1spU3r-00Egu6-Au for pgsql-general@lists.postgresql.org; Sat, 14 Sep 2024 14:47:43 +0000 Received: from mail-oi1-x236.google.com ([2607:f8b0:4864:20::236]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1spU3n-001AQv-Rc for pgsql-general@postgresql.org; Sat, 14 Sep 2024 14:47:42 +0000 Received: by mail-oi1-x236.google.com with SMTP id 5614622812f47-3e039666812so1493403b6e.1 for ; Sat, 14 Sep 2024 07:47:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726325259; x=1726930059; darn=postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=vg51wnb+z0gPl4rlB+5lyW+TUb0UP5gaGaQH8kkPoF8=; b=IDPYAk5ABxxiuQzjUv3Da8TbOhHkq6UfEXkiWBwttS+bcJJNKzS32Y81OjPDAEHyEC hhoI0MBYBp3MgvtY1mWHPu6FdwQkTZdxd2HNRHBoEpKgB2ra787AqQHBBOnqpv6zzWui Hg18tfEKZxZhIpbLws6n2Uoo0SPa/QBUH3btsaZFIDiDA2kltWCXNNUhH4PFb01TdClr Tznbgt2bQZJU/ve23udTzsGxSvgcBqdQDQiaHwle02e9ZfC8MUr9rbGHYlQoT32MBrt8 zlUF0gSm18lZtMdaM4wNomxRRRhIDv4B6PtHoEwUwoIBEtS2bddWrN9TOSpQvqJRKKk5 7NTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726325259; x=1726930059; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vg51wnb+z0gPl4rlB+5lyW+TUb0UP5gaGaQH8kkPoF8=; b=NHqtQQxz9gmsa6a+nsZrS02HHEy+Ur3QGKeoJCIJP3vCdVTdtWQH/d12NaaEVXS2yj Vy02lur4WfZiWPzUJ5i6lkT/iyAWaILp4EfN++I13po6YZv3zQGUxKTGaZejbMWuKu7+ mvC5JOPis0M5ESkUjStUkqBW5zyzIrfDpj23zT+l4XriV+UXxuRvggOB17DozPfHB/Vg k5KNkJ+WOjLJVwL3QNk8EwUfBw9lQQlfQMYI0xOXD+/z0d8AKU5PUPllx3+Kv9cq12yB zZo7NupV2ZgaHSC4d6cfIDczTC93fOlRnh9wfUY9rdMDOm+LHGW8oHJMfru7O01MQ5qa ILjg== X-Gm-Message-State: AOJu0YyEn1W/kbRIsmXlvdASvIyuzyACNT/bp+mHGUQvD2kCmmQ6udIF Wnb/xt+IDZtkHOmeGad9w4S/XySZ4wDGnRn5yXAe5B6Bc9eoE6uDcXWXuFywC9RgXJ6zEICzpXk vXlTQgYb4AEX2ji1uTKBNGg/6VEl0QoU7 X-Google-Smtp-Source: AGHT+IE4wQo1b4qxlHfNYiY52D4CckBrDijydSpjVOeiH4A7I2vHJn7+kXWMF5PyBfdHs6NKokMBOSk+m2q1LS/mzf4= X-Received: by 2002:a05:6808:1902:b0:3d9:37b8:dae7 with SMTP id 5614622812f47-3e071a9357amr5713860b6e.1.1726325259190; Sat, 14 Sep 2024 07:47:39 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ron Johnson Date: Sat, 14 Sep 2024 10:47:28 -0400 Message-ID: Subject: Re: update faster way To: pgsql-general Content-Type: multipart/alternative; boundary="000000000000d74d3b0622156be8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000d74d3b0622156be8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Sep 13, 2024 at 11:59=E2=80=AFPM yudhi s wrote: > >> >> Do you have any indexes? >> If not - you should, if yes - what are they? >> >> >> > Yes we have a primary key on this table which is on a UUID type column an= d > also we have other indexes in other timestamp columns . But how is this > going to help as we are going to update almost all the rows in the table? > But do you have an index on tab_part1.column1? And how slow is subquery? --000000000000d74d3b0622156be8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Sep 13, 2024 at 11:59=E2=80=AFPM = yudhi s <learnerdatabase9= 9@gmail.com> wrote:


Do you have any indexes?
If not - you should, if yes - what are they?



Yes we have a primary key on this = table which is on a UUID type column and also we have other indexes in othe= r timestamp columns . But how is this going to help as we are going to upda= te=C2=A0almost all the rows in the table?

But do you have an index on tab_p= art1.column1?

And how slow is subquery?

<= /div> --000000000000d74d3b0622156be8--