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 1t3L9m-00C0rs-Mi for pgsql-general@arkaria.postgresql.org; Tue, 22 Oct 2024 20:07:06 +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 1t3L9k-002wIQ-Oj for pgsql-general@arkaria.postgresql.org; Tue, 22 Oct 2024 20:07:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t3L9k-002wIH-Dn for pgsql-general@lists.postgresql.org; Tue, 22 Oct 2024 20:07:04 +0000 Received: from mail-oa1-x29.google.com ([2001:4860:4864:20::29]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1t3L9e-002L2v-Bs for pgsql-general@lists.postgresql.org; Tue, 22 Oct 2024 20:07:03 +0000 Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-2887abeefbdso3099612fac.0 for ; Tue, 22 Oct 2024 13:06:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729627617; x=1730232417; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=IkGnwHgL5InLyrLhF8y+fA7131aVqCyJdHytxDY4raU=; b=mQaEBcnurq5UPbBJg550x7x0eKjjqQ5koPP4HOaArloMEdYNZDXgmQg5LnuMe1+pqy vxjlBSdxQyH0SyXQVLU6EuixGzh0Uj1lKZXc3ej3SF35+HuVIrVo74Gv73TL9JzQjZ2G Yr34682cQdpbb9hkPI4hpSjZ2584lU2Z/5Nvux2x49zOrGsIE53bBkZn8VkfH5nea4t0 rZiA+E4kOaHIzkv7ugVpbb8h5nZ0jndrqIurQtuYABp1OblEw/zd6+SxqQh6qsFNFUev kUvg1w43nRIJLYKMzj2tQE3lV2wBuiHFraBLZH4Yzs9LDnmDatPrqQARo05MerBqUZaK 6NPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729627617; x=1730232417; h=cc: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=IkGnwHgL5InLyrLhF8y+fA7131aVqCyJdHytxDY4raU=; b=jIjEsiXuB38FTaA8pwDAzft6Yg3YWPxSzPcVe4NgwBElnudwYTMZimJUs4VzmgLXBi CQx9XSxUqm7gmb2Q0sWfTLpzV7WOV76vBZlje3ubZEQ4ILzch/WuSYhJA+oFIRp6zkxJ //xXja4i0pHHmSX7dVKfp3i94z0uYDobnbIH5As2RnGcuvdMXRE54ext87udYbkk2SiO JrpkiwGHjXXyUh/YOG+xMzbKcKJaQNarwmuckfLkVgkpRXc6ZNeSzb4g+oqwWDonOy4i DM5mspt5RcyluD73yZ8B9l7QUKSNbDdFEEwVsCwHOIdmJsZm9etDGh1NHX8JqcSnD04P 8xdw== X-Gm-Message-State: AOJu0YzF/UuTCBzEnIghDlXinbkFHYeTjeLp4erRtvAL6HYgo0Z8mSPh FNKJnFN8yvhM+Jdwppxa6vIhiJHJpc1NmsySQooC8W5Sx9Zzws+llLFXe6tmBbU2RArPjBZDVXs 2AaPcx0W1jigOF6lFEsX8LyD3L3gvQQ== X-Google-Smtp-Source: AGHT+IET1RdCpuZnf/Zd9t5adr2fUxsWG3lNCpPJkckWoIAC3EsBiCE5wfRbb79Sjvw5xRd3NV0BS9skx4+OTycSxas= X-Received: by 2002:a05:6870:b4a3:b0:278:c6bf:fd34 with SMTP id 586e51a60fabf-28ccb4a648emr409289fac.27.1729627617337; Tue, 22 Oct 2024 13:06:57 -0700 (PDT) MIME-Version: 1.0 References: <20241016213610.wbfqj3r7gg5ba6eh@hjp.at> In-Reply-To: From: "David G. Johnston" Date: Tue, 22 Oct 2024 13:06:20 -0700 Message-ID: Subject: Re: Query performance issue To: Ron Johnson Cc: "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000b9ae3d0625164f6d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000b9ae3d0625164f6d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Oct 22, 2024 at 1:01=E2=80=AFPM Ron Johnson wrote: > On Tue, Oct 22, 2024 at 3:02=E2=80=AFPM Greg Sabino Mullane > wrote: > [snip] > >> * Don't use the "FROM table1, table2, table3" syntax but use "FROM table= 1 >> JOIN table2 ON (...) JOIN table3 ON (...) >> > > Why? > > Readability is improved when done correctly; and you need to know it for outer joins anyway, so consistency. David J. --000000000000b9ae3d0625164f6d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Oct 22, 2024 at 1:01=E2=80=AFPM Ron Johnson <ronljohnsonjr@gmail.com> wr= ote:
On Tue, Oct 22, = 2024 at 3:02=E2=80=AFPM Greg Sabino Mullane <htamfids@gmail.com> wrote:
[snip]=C2=A0
* Don't use the "FROM table= 1, table2, table3" syntax but use "FROM table1 JOIN table2 ON (..= .) JOIN table3 ON (...)

Why?


<= div class=3D"gmail_default" style=3D"font-family:arial,helvetica,sans-serif= ">Readability is improved when done correctly; and you need to know it for = outer joins anyway, so consistency.

David J.
<= br>
--000000000000b9ae3d0625164f6d--