Search Postgresql Archives

Set cost for a specific index scan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux