Hi all,

I'm using an open-source "extension"  that creates an index for special type of 
search and you need to use a custom operator to run queries. Anyway If I run an 
according query with multiple filters as example also range of primary key  
PostgreSQL almost always selects this 3rd party index as the first index to 
scan. However this index is almost always slower than a "normal" index. This 
leads to queries with a filter primary_key < 10 taking several seconds because 
the 3rd party index  taking that much time. In the explain plan it is visible 
that PostgreSQL seems to prefer this index over other indexes.

Is there any way to increase the cost for this specific index (or operator) so 
that any other index is always used first?

Beat Regards,

Thomas
                                          

Reply via email to