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.96) (envelope-from ) id 1vPPBW-0011Ly-1S for pgsql-general@arkaria.postgresql.org; Sat, 29 Nov 2025 17:56:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vPPBT-00FHbS-2G for pgsql-general@arkaria.postgresql.org; Sat, 29 Nov 2025 17:56:36 +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.96) (envelope-from ) id 1vPPBT-00FHbJ-1E for pgsql-general@lists.postgresql.org; Sat, 29 Nov 2025 17:56:35 +0000 Received: from fout-a6-smtp.messagingengine.com ([103.168.172.149]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vPPBR-002HOG-0n for pgsql-general@postgresql.org; Sat, 29 Nov 2025 17:56:34 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id 48EACEC0970; Sat, 29 Nov 2025 12:56:33 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Sat, 29 Nov 2025 12:56:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1764438993; x=1764525393; bh=WNfOxHdAg6o1xfMlayUy+u22CW0I1m2zwYXWC01YG1Y=; b= BcOUfcocjJrPHlT9ln5u/gLO+bLMCQaihs+YlnppNz6ez++CMrAKMI4SHloJ3hK1 T6ZoYta0I+y554ABqJqfMEBaanyYsZgUa1lKjAYfGVidcMLjFxEAWGolX4/rN3H6 vErO6dPj0rAJO1bttoqbAaao6djZNc0WaD5H5koxVMdgnnxVRIawUp5RNnYmlNXq YI1yTYF9qf3+fuBcsoUe8iImZuIByMy3s8t235ZuvWXjAZnBaJvCTOoy1mCdDRXu RqMBVfbWN14iavU4w+GfJlqDivzh/YjtgGlkD+3Bga1Uc5j6Sw5qhRmZ3ez+Jgpl tr8Nh8V54XCeG/NwTf+KVg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1764438993; x=1764525393; bh=W NfOxHdAg6o1xfMlayUy+u22CW0I1m2zwYXWC01YG1Y=; b=wiC4OqWEUhrV4wbkT U0Ih1bI9M54g7mq0JQPR5RNJWBe5931wyLxwc10WgfzPz7TQr29PNJO7u8ZPRV0C GmZ0j66lwD0pByJMbM+2hRRw7x2e+zBYdW0BFf8f3iQaryyX5gVJZjvIPOv/Mv5W EvvmN/VUmo9qLZTXtkwX4aPK0mD8briHO2A9cdN0KefZ4jDSVnRBkwt5hEaJzqUH 0LNhwFuTiWNLGub3Fl32NqOhd8a13v4XeH0qNaazZdvlRxSErMG37GV3nVbUypKu diAvmjk37zNrii2hLiUvNctfdyfJ1PiRZIlJxqGeNibYVdb0B8/HAr9BeXeuz1Di RZtkw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvheefuddvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertd dtvdejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgr vhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepkeefheduvdejie fgieefjedtudduffelvdefleehfedtieffuefgvdekleegtddvnecuffhomhgrihhnpehp ohhsthhgrhgvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm pdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehkoh gsrhhulhgvhhhtvdeshhhothdrvggvpdhrtghpthhtohepphhgshhqlhdqghgvnhgvrhgr lhesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 29 Nov 2025 12:56:32 -0500 (EST) Message-ID: <8d872370-4d70-4398-b234-fe60a740032a@aklaver.com> Date: Sat, 29 Nov 2025 09:56:31 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: How to use index in simple select To: Andrus , pgsql-general References: <3093741e-6a84-43e8-a009-fccff8abe998@aklaver.com> <432c3538-e3b8-4e51-ad78-a30acddb5496@hot.ee> Content-Language: en-US From: Adrian Klaver In-Reply-To: <432c3538-e3b8-4e51-ad78-a30acddb5496@hot.ee> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/29/25 09:47, Andrus wrote: > Hi! > >> Seems to be already answered: >> >> "It looks like reindex table firma2.klient restored index scan. create >> index concurrently was used when lot of transactions using this table >> where running" >> > Is it possible that reindex changes query from sequential scan to use > index ? More likely it was one of the build index concurrently caveats detailed here: https://www.postgresql.org/docs/current/sql-createindex.html#SQL-CREATEINDEX-CONCURRENTLY > > Andrus. > -- Adrian Klaver adrian.klaver@aklaver.com