Re: Forcing index scan on query produces 16x faster

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christian Brink <cbrink(at)r-stream(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Forcing index scan on query produces 16x faster
Date: 2010-03-17 22:04:25
Message-ID: 27001.1268863465@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Christian Brink <cbrink(at)r-stream(dot)com> writes:
> Is there a way to rewrite or hint the planner to get me the better plan
> without resorting to 'enable_seqscan' manipulation (or am I missing
> something)?

I think your problem is here:

> PostgreSQL 8.0.3 on i386-redhat-linux-gnu, compiled by GCC
> i386-redhat-linux-gcc (GCC) 4.0.0 20050505 (Red Hat 4.0.0-4)

Recent versions are significantly smarter about grouping operations
than that dinosaur.

(Even if you must stay on 8.0.x, you should at least be running
8.0.something-recent; what you have is full of security and data-loss
risks. 8.0.24 was released this week.)

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Ben Chobot 2010-03-17 22:53:43 Re: Testing FusionIO
Previous Message David Wilson 2010-03-17 21:56:55 Re: Forcing index scan on query produces 16x faster