Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gmgVV-0008FM-BE for pgsql-general@arkaria.postgresql.org; Thu, 24 Jan 2019 15:01:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gmgVT-0002Fi-Q2 for pgsql-general@arkaria.postgresql.org; Thu, 24 Jan 2019 15:01:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gmgVT-0002Fb-IB for pgsql-general@lists.postgresql.org; Thu, 24 Jan 2019 15:01:27 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gmgVL-0007dm-MY for pgsql-general@postgresql.org; Thu, 24 Jan 2019 15:01:26 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 13D311199EA24 for ; Thu, 24 Jan 2019 08:01:18 -0700 (MST) Date: Thu, 24 Jan 2019 08:01:18 -0700 (MST) From: twoflower To: pgsql-general@postgresql.org Message-ID: <1548342078079-0.post@n3.nabble.com> In-Reply-To: <16149.1548341096@sss.pgh.pa.us> References: <1548339807217-0.post@n3.nabble.com> <16149.1548341096@sss.pgh.pa.us> Subject: Re: Postgres 11 chooses seq scan instead of index-only scan MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_928393_1578827696.1548342078079" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_928393_1578827696.1548342078079 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Yes! That was it, after running VACUUM TABLE history_translation, the query is now executed using index-only scan. I was under the impression that ANALYZE TABLE history_translation is enough, but it is not. Thank you very much. -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html ------=_Part_928393_1578827696.1548342078079 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Yes! That was it, after running VACUUM TABLE history_translation, the query is now executed using index-only scan.

I was under the impression that ANALYZE TABLE history_translation is enough, but it is not.

Thank you very much.

Sent from the PostgreSQL - general mailing list archive at Nabble.com.
------=_Part_928393_1578827696.1548342078079--