Re: BUG #13824: EXISTS sometimes uses seq scan instead of index - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #13824: EXISTS sometimes uses seq scan instead of index
Date
Msg-id 13864.1450401461@sss.pgh.pa.us
Whole thread Raw
In response to BUG #13824: EXISTS sometimes uses seq scan instead of index  (grzegorz@thulium.pl)
Responses Re: BUG #13824: EXISTS sometimes uses seq scan instead of index  (Grzegorz Garlewicz <grzegorz@thulium.pl>)
List pgsql-bugs
grzegorz@thulium.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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Known issues on PostgreSQL server 8.1.19
Next
From: Michael Paquier
Date:
Subject: Re: BUG #13822: Slave terminated - WAL contains references to invalid page