Re: This table won't use INDEX until I DUMP/RESTORE it ? - Mailing list pgsql-admin

From Tom Lane
Subject Re: This table won't use INDEX until I DUMP/RESTORE it ?
Date
Msg-id 29274.1061503507@sss.pgh.pa.us
Whole thread Raw
In response to Re: This table won't use INDEX until I DUMP/RESTORE it ?  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-admin
Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> That was more to get its idea for the cost of the index scan.
> As a short term thing, if you havent played with random_page_cost,
> I'd suggest lowering it from the default 4 to say 3 or 2 and see
> what plan it gives you.

Given the closeness of the two cost estimates, random_page_cost
shouldn't need to be moved much at all to flip the plan choice to
indexscan for this particular query.  You might want to move it more
so that the ratio of the estimates approximates reality, but I advise
caution on that, or at least caution on using this example as the
test case.  There's a fairly large misestimate of the number of returned
rows in there too, and so if you use this case you'll be conflating
the effects of that misestimate with the effects of random_page_cost
being wrong for your environment.

            regards, tom lane

pgsql-admin by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Indexing a boolean
Next
From: "scott.marlowe"
Date:
Subject: Re: Indexing a boolean