Re: Indexes on expressions with multiple columns and operators

From: Andrei Lepikhov <lepihov(at)gmail(dot)com>
To: Frédéric Yhuel <frederic(dot)yhuel(at)dalibo(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org>, Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com>, Christophe Courtois <christophe(dot)courtois(at)dalibo(dot)com>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Subject: Re: Indexes on expressions with multiple columns and operators
Date: 2025-10-13 14:00:35
Message-ID: 22c38fe8-e673-46ec-b025-6ea964b3502f@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 25/9/2025 12:41, Frédéric Yhuel wrote:
> So, on SQL Server, you can do this:
> CREATE STATISTICS FooStats ON foo (ackid, crit) WHERE crit = 'WARNING';
>
> It would be great to have a similar feature in PostgreSQL.Nice! Thanks for the report. I think the only reason why Postgres
doesn't have it yet is the computational cost. SQL Server utilises a
separate background worker to manage this vast amount of statistical
data. Not sure that Postgres core wants it. Maybe one more contrib
extension can be a solution?

--
regards, Andrei Lepikhov,
pgEdge

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2025-10-13 14:55:07 Re: Indexes on expressions with multiple columns and operators
Previous Message Andrei Lepikhov 2025-10-13 13:56:59 Re: Indexes on expressions with multiple columns and operators