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 1kos2u-0004Qh-PD for pgsql-general@arkaria.postgresql.org; Mon, 14 Dec 2020 17:54:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kos2t-0001Gi-Ey for pgsql-general@arkaria.postgresql.org; Mon, 14 Dec 2020 17:54:03 +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 1korze-0003l1-QH for pgsql-general@lists.postgresql.org; Mon, 14 Dec 2020 17:50:42 +0000 Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1korzc-0005w6-RS for pgsql-general@lists.postgresql.org; Mon, 14 Dec 2020 17:50:41 +0000 Received: by mail-io1-xd30.google.com with SMTP id n4so17708845iow.12 for ; Mon, 14 Dec 2020 09:50:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=ABcqGzUEdNrjmZ3wMXdbtppOXZ6Ed/LUTWBfzwK6GFc=; b=pSBQIZ7qT9XIrVWewBZLSBL0RRJoHWKaM8Nhw0SHo8aYuiPkrP3a0U3qpI49Pg+zBw 60UZiama2JGBCkKjSeGdAS26j531P0nH+Y9xv0pt2wqrLI9GMRf7obQD4QezVMKyXF09 owEQWKl6ofzdpx8PFzvBPfdowgmPY7FyGJYZZX6CCaRPzbAp7wYIYD6dNiUG5wvqCtUE CxONDDHEVqESbUYK02RqzprJFenOedF9Rf+eGe0revWad3KkDPJqkEGNw01urwpq9DuM CprW8OGoGnKikaRb44BM1vcv6o9pbFCIW2Q4UUPjH+a0CQ/8E33Oi0dgJHVLgSHqjcWd xjEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=ABcqGzUEdNrjmZ3wMXdbtppOXZ6Ed/LUTWBfzwK6GFc=; b=oIsIW8PDM2vPXwhWqipwVxC4s4hUiEFc6BlCTvzorGSMxuP9N6YMXE6TMbVonzT+uN FnJV9IwLGNBicpWaL1mzieAZxVqpLCVeLPCuv5A7kDukih1YE3dhY3EMA2ATv+n9yqBE EDOTWf8tV+9Zlg66b+CElK4++VyuL/3tdjfffDg4LURiYvrSYgn6QVMumFYEOfPZOclB wSozvpaERjuhmbqErWXyQmh6DkSFpC75EvVHcEXTsfbF8Tgx+z/EebB0BOj+YCaBXieo 6kgWzKPnIuCdF5P8UvA+pkpdR3au3quyb69kfinSmW4+7Iu6e7qdOKtu50v0BhjKBcPe 6wtA== X-Gm-Message-State: AOAM531OOTlyguVybo4KBeTqr0Tj+64GK1fuyovAXPJgccBhmaar/otD Mc8nerWdLmyDt/WLkMSStKI= X-Google-Smtp-Source: ABdhPJw/Iw8jNRN9fx4QYk9vY72rd5gHOeswgW7NRx6ZC1qo84geyhmOqzOsBuynLuQ/L/9a63GwLw== X-Received: by 2002:a6b:928b:: with SMTP id u133mr33551568iod.145.1607968240374; Mon, 14 Dec 2020 09:50:40 -0800 (PST) Received: from ?IPv6:2601:681:5500:dde0:f170:24ac:f4a9:829f? ([2601:681:5500:dde0:f170:24ac:f4a9:829f]) by smtp.gmail.com with ESMTPSA id k23sm12170850ilg.57.2020.12.14.09.50.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Dec 2020 09:50:39 -0800 (PST) From: Rob Sargent Message-Id: <4C1E13A7-63F6-473F-B249-E79F45E9D024@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_5240C74B-E056-4307-8259-E7F850599592" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: Improving performance of select query Date: Mon, 14 Dec 2020 10:50:39 -0700 In-Reply-To: Cc: pgsql-general To: Muhammad Bilal Jamil References: <20c57bfb287749c2a5ff22d7ddd3df93@sandvine.com> <93B14ED6-5AD1-4427-AED6-A4B80D27DD15@gmail.com> X-Mailer: Apple Mail (2.3608.120.23.2.4) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_5240C74B-E056-4307-8259-E7F850599592 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Dec 14, 2020, at 10:37 AM, Muhammad Bilal Jamil = wrote: >=20 > I think you can also increase the query performance by creating = indexes? >=20 >=20 >=20 OP said there was a key on the target (large) table. I=E2=80=99m not = sure there=E2=80=99s much of a win in indexing 10K ids. >=20 >=20 --Apple-Mail=_5240C74B-E056-4307-8259-E7F850599592 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Dec 14, 2020, at 10:37 AM, Muhammad Bilal Jamil <mbjamil92@gmail.com>= wrote:

I think you can also increase the query = performance by creating indexes?




OP said there was a key on the target (large) table. =  I=E2=80=99m not sure there=E2=80=99s much of a win in indexing 10K = ids.



= --Apple-Mail=_5240C74B-E056-4307-8259-E7F850599592--