public inbox for [email protected]  
help / color / mirror / Atom feed
From: Greg Sabino Mullane <[email protected]>
To: James Addison <[email protected]>
Cc: [email protected]
Cc: Tom Lane <[email protected]>
Subject: Re: Question: consolidating strpos searches?
Date: Sat, 4 Jan 2025 14:03:59 -0500
Message-ID: <CAKAnmm+YvxoQgFrQNTUm1gNh3NSHqbwie4fx--dLp7xXjdj=9Q@mail.gmail.com> (raw)
In-Reply-To: <CALDQ5Ny-+ZxLuJiqC11EafO11F-KVSBgWnrWqWpRt4bw1L+hhw@mail.gmail.com>
References: <CALDQ5Ny-+ZxLuJiqC11EafO11F-KVSBgWnrWqWpRt4bw1L+hhw@mail.gmail.com>

On Sat, Jan 4, 2025 at 12:16 PM James Addison <[email protected]> wrote:

> In the context of considering writing a patch: would the complexity of
> implementing such a feature for PostgreSQL be worth the potential
> performance benefits?


Probably not. As Tom said, this sounds like it should be tried as an
extension.

And either way, is there more I should learn about and consider?  How would
> I provide convincing supporting
> evidence if I do write a patch?
>

As this is the performance mailing list, it might help to describe the
real-world problem being encountered here. There are other ways to solve
this particular issue. Among them would be using OR not AND in your
contrived example, using partial indexes, using pg_trgm,  using regular
expressions ( i.e. WHERE value ~ '(known|suffix)' ), redesigning your table
and/or queries, and outsourcing the searching of large strings to a system
more suitable for it.

Cheers,
Greg


view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Question: consolidating strpos searches?
  In-Reply-To: <CAKAnmm+YvxoQgFrQNTUm1gNh3NSHqbwie4fx--dLp7xXjdj=9Q@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox