Re: Unused expression indexes

2024-08-07 Thread Maciek Sakrejda
Great, thank you both for the info.

Re: Unused expression indexes

2024-08-06 Thread Tomas Vondra
it's not >> clear how they could change plans), and Bruce's answer to a comment >> [2] suggests that this is not documented. > >> Is there any more info on this mechanism? Specifically, if one has >> unused expression indexes (according to pg_stat_user_indexes), is

Re: Unused expression indexes

2024-08-06 Thread Tom Lane
Maciek Sakrejda writes: > Thanks, but I was asking specifically about _unused_ indexes > (according to pg_stat_user_indexes). Bruce's blog post showed how they > can still influence rowcount estimates, but can they do that (1) even > if they don't end up being used by the query plan and (2) in a w

Re: Unused expression indexes

2024-08-06 Thread Maciek Sakrejda
to pg_stat_user_indexes). Bruce's blog post showed how they can still influence rowcount estimates, but can they do that (1) even if they don't end up being used by the query plan and (2) in a way that leads to a different plan? Basically, if I have some unused expression indexes, is it safe to drop them, or could they be used for planning optimizations even if they are not used directly. Thanks, Maciek

Re: Unused expression indexes

2024-08-06 Thread Tom Lane
and Bruce's answer to a comment > [2] suggests that this is not documented. > Is there any more info on this mechanism? Specifically, if one has > unused expression indexes (according to pg_stat_user_indexes), is it > safe to drop them? Or could they be providing statistics that

Unused expression indexes

2024-08-06 Thread Maciek Sakrejda
gests that this is not documented. Is there any more info on this mechanism? Specifically, if one has unused expression indexes (according to pg_stat_user_indexes), is it safe to drop them? Or could they be providing statistics that materially affect query planning even though the indexes themse