On 05/28/2014 12:59 PM, Grzegorz Olszewski wrote:
random_page_cost = 4.0 seq_page_cost = 1.0 There is about 500,000 rows and about 500 new rows each business day. About 96% of rows meet given conditions, that is, count shoud be about 480,000.
When such a large percentage of the rows match, a sequential scan is indeed a better plan than an index scan. Sequential access is much faster than random access.
- Heikki