| From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
|---|---|
| To: | Marc Boucher <pgml(at)gmx(dot)net> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: index and queries using '<' '>' |
| Date: | 2004-11-19 15:16:28 |
| Message-ID: | 20041119151628.GA23749@wolff.to |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Fri, Nov 19, 2004 at 15:47:21 +0100,
Marc Boucher <pgml(at)gmx(dot)net> wrote:
> I know that, but I've some comparisons with other queries. And someone
> advised me to try "set enable_seqscan=off;". It takes 50-60% (after
> checking right now) less to use the index. Unfortunately I can't use this
> setting, the query being part of a larger query (joins), and the time
> gained on this particular index is partially lost on the joins.
Tweaking random_page_cost may help. The default is 4, which is often too
high. It is supposed to represent the relative cost of retrieving disk
blocks in a random order as compared to retrieving them in sequential
order. Lowering this value will make index scans look better. Than value
should not be lowered below 1.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Taber, Mark | 2004-11-19 15:19:55 | Phantom user in db--'128' |
| Previous Message | Kenneth Downs | 2004-11-19 15:14:51 | Re: pgEdit public beta for Macintosh and Windows |