On Fri, Oct 26, 2012 at 8:30 AM, Kevin Grittner <kgrittn@xxxxxxxx> wrote: > ktm@xxxxxxxx wrote: > >> You have the sequential_page_cost = 1 which is better than or equal >> to the random_page_cost in all of your examples. It sounds like you >> need a sequential_page_cost of 5, 10, 20 or more. > > The goal should be to set the cost factors so that they model actual > costs for you workload in your environment. Unfortunately the random_page_cost is getting multiplied by an estimated page count which is 4 orders of magnitude too high. random_page_cost and seq_page_cost (and enable_seqscan) might not be the right knobs, but they are the knobs that currently exist. Cheers, Jeff -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance