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 1vhP1t-00ESyv-1l for pgsql-performance@arkaria.postgresql.org; Sun, 18 Jan 2026 09:25:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vhP1r-00AHXh-2f for pgsql-performance@arkaria.postgresql.org; Sun, 18 Jan 2026 09:25:04 +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.96) (envelope-from ) id 1vhP1r-00AHXS-1b for pgsql-performance@lists.postgresql.org; Sun, 18 Jan 2026 09:25:03 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vhP1p-0018xw-0q for pgsql-performance@lists.postgresql.org; Sun, 18 Jan 2026 09:25:02 +0000 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-4308d81fdf6so1799482f8f.2 for ; Sun, 18 Jan 2026 01:24:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768728299; x=1769333099; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=MhduP9qYpXFcf9/LyIZXaQRR/FqR+RcwxsLkL2J+CYk=; b=KR/MecCCxaT1iZF0bsZbbG3nfodcUmJ9nV500F/QJAf8Yzgu5uu4ra8rQtjoShJrqL fvQhdwJVCqq6ZaOre/xP5FtUQsNfySGPs9m6aRy9w7uepbBEQPdo/BuhGWbjtP3COpk/ 4GsmS/Ptde4qbZoncpdrd9xxyNyZty3mezRczSb+rk/lhEmxgwFTWi2JzrMApsWbnwbY 4hXOjcVJj8OkScit2bqVZ8/ZWo+gngrp2mAg/lVEl8xYhDacBrPfLxu6AqhB6IayPc6S 5hr3H/8fE6coZ6pjC4pZBuW3XQRZPDtlnpHVVDukfxuHig4CY/SHMVwfHp/1M+T73/hU ZJZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768728299; x=1769333099; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MhduP9qYpXFcf9/LyIZXaQRR/FqR+RcwxsLkL2J+CYk=; b=HTwb85ZfpxRhYEgFFh16Q1nS2LWe6FI7phfWAXywqtez/zIRGU2jU/sUE954K4bb4E vtSKDWv/R0Mp4AEMP9QjJQf/kejt8j0DLkyR7UiDYp2YYeXt5g+qpIohe4iGcHwLhi5c oEHDnbaQho/1GbG6fqWxaINIFeWwps8r7XFOvFU+rFlvdG6QaBwtl2IVaPu82nR1P5DU KMQWDSTMooDs0ETiFk/NlaiLY5Au1MPkHGQx9XvXsl/v2hsELAsYmSzs7lrQx8SwaoPN 9HPkFOox05PltYRgyOb8pCOQWUQ/+vMxq0czpyr93sRRjdaPjV3mMLwkydImoRk43pRH L+wg== X-Forwarded-Encrypted: i=1; AJvYcCUCLVJAHeb3jjF+gkE5V8d3KX2xhsJgxnfizv0hKczjRSBOShFoRoDNRvlQh5mJSaJZWQhJEWVs0n1JROd/f428sQ==@lists.postgresql.org X-Gm-Message-State: AOJu0YxrBvIX7Gi+M3ECo94dOqeEAX3PUMP5DQ5fZ/ytOdqsexFbRJMf mqFCp4h0t3kkVEKTIhhjFAHJlLgvYlV5ubwPiWTDTKsU/Y0n6Qj7HAmb X-Gm-Gg: AY/fxX62C/juMMdkwX6QxnvRl77OW0naeD8fVYSf6D7C5328lZ0vl8CO77e5MWzUQct rjqBpmQIqvw7WTi7HRfmsrkaRJoYkh+5yojKHxNncXKohxkGTRP2++2+Fr62CmknNUGqAvz6Uz5 d7sbQ5ZLRJ/Q7W9xW2385lTtK6Y3ZX72OY+uc17lhHWB3t03SJ7/s+TL1pebpiYS45YEQZk+TdA EFYT8NuqwICrLuOfFmfKN/gOK5/D6KCNm5jLHXayABFit5SECy7/P8rY9MJe2RX/QBiLQ5NFZSh MelyZGnpYxAr4JcxBF1QIml9+0w52zOeD28KJp3G2kauQA4DuyH45S2H4dTdNg1acNGwtwsJ59N 9SLului3P1xge4F1jyvOCqgxdc/OMfeNL0cFR/D50jfQ0wkta6zTxUv6PPcP+wrbOt7FGOppRah obp0jbeonzmSP997EMBpmUaXDfH8mA7xhFatAFS9mGxxxSMc7u2yH+g5L14SudAw== X-Received: by 2002:a05:6000:1acb:b0:3ec:db87:e5f4 with SMTP id ffacd0b85a97d-435699787b0mr9006037f8f.7.1768728298611; Sun, 18 Jan 2026 01:24:58 -0800 (PST) Received: from [192.168.0.86] (84.123.225.106.dyn.user.ono.com. [84.123.225.106]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4356996cecasm14873035f8f.26.2026.01.18.01.24.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 18 Jan 2026 01:24:57 -0800 (PST) Message-ID: <8f2a034a-6e32-43f4-92e9-276b15dc0a5f@gmail.com> Date: Sun, 18 Jan 2026 10:24:56 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Slow queries on simple index To: Tom Lane Cc: Lillian Berry , pgsql-performance@lists.postgresql.org, infra@pluralkit.me References: <1d79d974-acfe-483c-81da-61989ed2f91b@gmail.com> <77030.1768684245@sss.pgh.pa.us> Content-Language: en-US From: Andrei Lepikhov In-Reply-To: <77030.1768684245@sss.pgh.pa.us> 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 17/1/26 22:10, Tom Lane wrote: > Andrei Lepikhov writes: >> Hmm, where is the evidence that your query uses theindex? Maybe the >> generic plan accidentally forces SeqScan? > > Oh ... you're on to something. I think we all assumed that this was > an intermittent problem, but if it happens every time, I bet it's a > datatype mismatch issue. Yes, index mismatches due to type differences are frequently a pain for me in the world of auto-generated queries. Why not spend a few additional cycles to check whether a potential cast is possible? I didn't track what happened in this example, but it would be beneficial to let an extension implement such functionality. The prosupport machinery attached to an index looks like a promising approach. -- regards, Andrei Lepikhov, pgEdge