Re: This table won't use INDEX until I DUMP/RESTORE it ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
Cc: Chris Miles <chris(at)psychofx(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: This table won't use INDEX until I DUMP/RESTORE it ?
Date: 2003-08-21 22:05:07
Message-ID: 29274.1061503507@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message scott.marlowe 2003-08-21 22:48:54 Re: Indexing a boolean
Previous Message Bruno Wolff III 2003-08-21 21:13:07 Re: Indexing a boolean