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 1v8J32-00G29w-80 for pgsql-performance@arkaria.postgresql.org; Mon, 13 Oct 2025 13:57:12 +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 1v8J2y-00613t-W5 for pgsql-performance@arkaria.postgresql.org; Mon, 13 Oct 2025 13:57:09 +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 1v8J2y-00613k-La for pgsql-performance@lists.postgresql.org; Mon, 13 Oct 2025 13:57:09 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v8J2x-001wM3-0e for pgsql-performance@lists.postgresql.org; Mon, 13 Oct 2025 13:57:09 +0000 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-3ee1381b835so2502033f8f.1 for ; Mon, 13 Oct 2025 06:57:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760363821; x=1760968621; 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=HGkKdgLSDgE9VHS3mukmmNQG0Tw3DqY5THaailoevT8=; b=Ad42L9tyK4sXauCZfiD5SS+DaIza/+vKIWOj/frLONLhHRsWtEfyZUL3M2EyoTt/Pc yp39jltO5NDWBr9MQIoMjlJQ4taDZNkugnT46/Jv7hhY0IUNepkl6Q7acU4RyFfu3TNJ udsVy0gRlr4FjAfatLxLFY8UldKKnjrP2IgAna9xHvUeEs8NHjRh1+9Ija+rJVmgZV3+ VpqAGfsTrsciWq3+WpksoZG+Imi/MVRAjH2sBlCpvDd2fVMJYmFqOP+mekqYrs9MceJi zDdeZIy5VSQ47EH53Z8B+m9dfCwO114W7oKgkQTy2ECDK8O71ibu6B43N6PmO69Rt89u DCnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760363821; x=1760968621; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HGkKdgLSDgE9VHS3mukmmNQG0Tw3DqY5THaailoevT8=; b=XTyj/zZv7FRvHKywnr6tP2p44mqTOtDV/64lLrTj962MSBfS4mt04fFKeycz/dVCqQ DtpZG4MsS3+pqir/KxxGEiKTopKVDVg/E4tPRCrQ3yptywqCP1BbhUUHlLEZcyLCNLgg DQxn2rs2oLiOYBsd8PLDVobD7gnA+bePztduXjrzPW2g2S4OiUgHz4Jyu4kWMZuvUbU4 A0226a3BZ52Uv9dbKFb2rpZlT0J8/At9TXQ+iq6HW5ErL8x1vMnVC6nbPDt06qUVeneu 7kN9gaKpZqhpq12UB7EG+EbEnbREbn5m0vPWHvjtjslqvS0sXJ/d7/4dqTP94F//+nKD 7JNQ== X-Forwarded-Encrypted: i=1; AJvYcCWtIYAQga8xF7nDzLzSgjs7U1prMeStPqJ4ZciBHExPW9g3blTJGRDT02i/MqE2IxQtgva6DzfyzIFarqf6wA/nZg==@lists.postgresql.org X-Gm-Message-State: AOJu0YxZ0+owpJLXzCQyLSv3unf1Uf4/Dvp4XnsPWEMo5RFsyWV+cTNm 6UXmx0R+hNN+EESFekAY1auYIKzylaP27qgnZePX30YAATSM0gyGhASg X-Gm-Gg: ASbGncutwJEXMFgF/tfM4NVFztnLiDjL4xUHmjps0Spd5o4f2R6oMfl0eaMDqazuQLU HrJJ9O6BrZSo3TwHnI/ix808vJVwYB07LMExAHNWpwOZqoVFBMvDuXkNdq6hMvjkvensmqOzGM+ RS8kh8ZUeff74fizhsxzaxFma2gXhL0foQnWMM7v6MlxKGp7ATA5sLzPh5VHeEbgegSezxzmEeB O1geTXiclSRGvhkvlUknqflPW/HoL9P5KxsfY/Fc+5AUr6qxpeBx4dqQQ7fAg7hZTH7Ob3XDzxf wBcYlEGommo/EAUXEtHEf8gME5+qSqR9gZj+jfIT+Q/9v8WtC3aQWC4W6u/NSleFDzFcHrSy/kb lrQ046foMz9TYcz7Hou5mBBwy/doehV73tI7P7v40eEUcOuexgoyI/yZG62MuGuI= X-Google-Smtp-Source: AGHT+IEifMlSlLlu61mCsuHumT7VTsoK0aWMDaAv58m5B1diYbhjy0mbQgIKGjSMbyG2W4eejQJJhg== X-Received: by 2002:a5d:64e8:0:b0:425:855c:5879 with SMTP id ffacd0b85a97d-4266e7d63f2mr13507712f8f.15.1760363820622; Mon, 13 Oct 2025 06:57:00 -0700 (PDT) Received: from [192.168.15.198] ([80.251.191.198]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-426d0d9050bsm16880782f8f.13.2025.10.13.06.56.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Oct 2025 06:56:59 -0700 (PDT) Message-ID: <57d14051-d5c6-4af2-a6e9-7e362dea354d@gmail.com> Date: Mon, 13 Oct 2025 15:56:59 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Indexes on expressions with multiple columns and operators To: =?UTF-8?Q?Fr=C3=A9d=C3=A9ric_Yhuel?= Cc: Tom Lane , "pgsql-performance@lists.postgresql.org" , Jehan-Guillaume de Rorthais , Christophe Courtois , Laurenz Albe References: <1507576.1758120083@sss.pgh.pa.us> <62133334-b844-4d0b-b248-1a8446757e5f@dalibo.com> <1916727.1758209549@sss.pgh.pa.us> <1972974.1758213639@sss.pgh.pa.us> <76fbd9ef-1fbb-49f0-bc8b-844462b18d1d@dalibo.com> <2432873.1758387110@sss.pgh.pa.us> <6ad08c0c-2c03-4b30-b5a7-dc486aa29c52@dalibo.com> <493a013c-63d1-467a-b9ec-352f77baf37a@dalibo.com> <9756a3e9-5dea-4506-a077-72a4d9c302df@gmail.com> Content-Language: en-US From: Andrei Lepikhov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 23/9/2025 15:31, Frédéric Yhuel wrote: > To get back to the topic of partitioned statistics, do you know if SQL > Server is smart enough to handle this case [1] that we discussed last > year? (with filtered statistics) > > [1] https://www.postgresql.org/message-id/flat/b860c71a-7cab-4d88- > ad87-8c1f2eea9ae8%40dalibo.com Not sure. After changing employers recently, I've lost access to the SQL Server instance :( and can't check how smart it is. However, as I recall, they design many features, and sometimes their optimiser finds a good solution/estimation through an unexpected approach. -- regards, Andrei Lepikhov, pgEdge