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 1sCEOv-0045Yg-0N for pgsql-general@arkaria.postgresql.org; Wed, 29 May 2024 08:11:14 +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 1sCEOv-00E6sn-0q for pgsql-general@arkaria.postgresql.org; Wed, 29 May 2024 08:11:13 +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.94.2) (envelope-from ) id 1sCEOu-00E6sf-Jp for pgsql-general@lists.postgresql.org; Wed, 29 May 2024 08:11:12 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sCEOs-001JPS-4U for pgsql-general@postgresql.org; Wed, 29 May 2024 08:11:12 +0000 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-52a6ef5e731so765142e87.0 for ; Wed, 29 May 2024 01:11:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716970269; x=1717575069; darn=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=j83bhwEazRiXzjVwbAtqwfqtmfNBLOrQOR2UMiz4F50=; b=D/fNgB9NozcifycQZz50ZFN7WOCaBFN18GE8NQUQAdrjahCOKqHkRjr+VMpTnLjcXV t2jSeNUki30BlQRTsJu20SS1SF4TVwfGfHszMDXxvIMmGL/kAEoKj3qW/HY4BnzYpSIs HVLf4NWe8ltU3lqTUCzShlNEUNSefLNq7j6NIW+7bqL1/W19CxA3ZAL+ao1Yu0VU3fEu PuvanaGVolB15UzWCqYiJsuobZZ7J1sMf45AsFdV3NqEyQpqVg7/hX/fvw1n+N/RN8Ki tGEKDW56rB6cCqL/kwTcFEHBL7dQbgSZ6mk0LhJRj7auc4zwXIaZC4IULeVyj4Ql0coQ zvdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716970269; x=1717575069; 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=j83bhwEazRiXzjVwbAtqwfqtmfNBLOrQOR2UMiz4F50=; b=EizuSC85KGar3t8S0SsvZTLLJSgp3vOGO4m8Vsl2DYnDRKRisaHTOSNHrwVq1ve659 Pw+5BxqB3z4gUAcUOcCh4a2zEHZkZ+ybQmFXTWtz/g5bOCmemK2NS48H80xFq+KjPpmH ihQ/+RZSNVg/Zxp3nYEB7cQpUqwGINfCZHgs0Yi9FBKDWFMGZVIL1hQb853HnE4sCYqs s0EjCTuhtyLaNNa+pl6pJGW2nWHKgtY9BQNPATCaRaxs5LVqdwLymW3NXRfSTU0yliEx J4uV17By8chvDUCKcz5rZg1kyCshvoQkHWXx8tPK32z/9RWdxduG6heFEDZuTsYPfjq/ SAYw== X-Forwarded-Encrypted: i=1; AJvYcCUD75GfiDTeDIH+iI6+ax5XkPpikANFgHDAm8Vxkc/jI4aMqRpM5/vUFlBVEXvrOAccY9uRa/nukFnniQKjtelDZHaD8RHvbviczwR+ X-Gm-Message-State: AOJu0YwO6R/2E9TzOovMtvWWbR0Br/ju+SQn1SuteUQcbGPBlWhmCaVq moBSD+sloR2vzxfEn7jhjyeMeRBH0FFpXrKtiloRD7ZrQCRJDBQ6e1WnjSvQJnsixdZ9e6DHl2b 5Gr8ybPdXIxCJoUpmt/VaaDzCukhJag== X-Google-Smtp-Source: AGHT+IEQsEtXlcERZ/ChyCh0poqvsKDRL93HDRzk61uld9Lek2hE0bWmQic0tq5N61yrADCV/uxYDzpoFfQZKllcgNE= X-Received: by 2002:ac2:5181:0:b0:52a:622c:dae8 with SMTP id 2adb3069b0e04-52a622cdcf6mr687849e87.20.1716970269269; Wed, 29 May 2024 01:11:09 -0700 (PDT) MIME-Version: 1.0 References: <2771.1716944001@sss.pgh.pa.us> In-Reply-To: <2771.1716944001@sss.pgh.pa.us> From: David Rowley Date: Wed, 29 May 2024 20:10:56 +1200 Message-ID: Subject: Re: Use of inefficient index in the presence of dead tuples To: Tom Lane Cc: Alexander Staubo , "pgsql-general@postgresql.org" Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 29 May 2024 at 12:53, Tom Lane wrote: > It would be interesting to see a non-artificial example that took > into account when the last auto-vacuum and auto-analyze really > happened, so we could see if there's any less-fragile way of > dealing with this situation. I think we need to find a way to give some additional preference to using indexes with more keys matching to quals. David