grzegorz(at)thulium(dot)pl writes:
> Whenever I perform select like below, planner thinks it's going to look up
> many rows and falls back to seq scan. If I disable seq scan, it correctly
> uses the index.
You might need to reduce random_page_cost to reflect your environment
better ... especially if you're most concerned about performance with
all data already cached in memory, which is what these examples are
probably showing.
regards, tom lane