Re: Terribly slow query with very good plan? - Mailing list pgsql-performance

From Nick Cleaton
Subject Re: Terribly slow query with very good plan?
Date
Msg-id CAFgz3ks1igJcYj+gKPwfX-YKMbUqZeMYyne=H4DevF9_6UVY0g@mail.gmail.com
Whole thread Raw
In response to Re: Terribly slow query with very good plan?  (Les <nagylzs@gmail.com>)
Responses Re: Terribly slow query with very good plan?  (Les <nagylzs@gmail.com>)
List pgsql-performance
On Fri, 4 Feb 2022 at 13:07, Les <nagylzs@gmail.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);
>
>
> It does not help.

What if you try applying the C collation to the values from the table:

where fi.is_active  and fi.relpath collate "C" ^@ 'A'



pgsql-performance by date:

Previous
From: Les
Date:
Subject: Re: Terribly slow query with very good plan?
Next
From: Les
Date:
Subject: Re: Terribly slow query with very good plan?