Re: Terribly slow query with very good plan?

From: Nick Cleaton <nick(at)cleaton(dot)net>
To: Les <nagylzs(at)gmail(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Terribly slow query with very good plan?
Date: 2022-02-04 12:59:21
Message-ID: CAFgz3kt-2mhWONWbYM_6uLSO2JLVkZxacdr+cThyehvikZwV1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, 4 Feb 2022 at 12:27, Les <nagylzs(at)gmail(dot)com> wrote:

> PostgreSQL uses seq scan for O, F, N, T letters, but it uses index scan for A, I, C letters (with the "like" query).

That's interesting.

Does it help if you create an additional index on relpath with the
text_pattern_ops modifier, e.g.

CREATE INDEX ... USING btree (relpath text_pattern_ops);

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Les 2022-02-04 13:07:59 Re: Terribly slow query with very good plan?
Previous Message Les 2022-02-04 12:27:28 Re: Terribly slow query with very good plan?