Re: Why should such a simple query over indexed columns be so slow? - Mailing list pgsql-performance

From Claudio Freire
Subject Re: Why should such a simple query over indexed columns be so slow?
Date
Msg-id CAGTBQpZ9Udxu58bv-mHTEjR=3eqVSXgeX4Gbh9KpUQGyDkZd=g@mail.gmail.com
Whole thread Raw
In response to Re: Why should such a simple query over indexed columns be so slow?  (Alessandro Gagliardi <alessandro@path.com>)
Responses Re: Why should such a simple query over indexed columns be so slow?
List pgsql-performance
On Mon, Jan 30, 2012 at 5:55 PM, Alessandro Gagliardi
<alessandro@path.com> wrote:
> Hm. Well, it looks like setting enable_seqscan=false is session specific, so
> it seems like I can use it with this query alone; but it sounds like even if
> that works, it's a bad practice. (Is that true?)

Yep

> My effective_cache_size is 1530000kB

Um... barring some really bizarre GUC setting, I cannot imagine how it
could be preferring the sequential scan.
Maybe some of the more knowedgeable folks has a hint.

In the meanwhile, you can use the seqscan stuff on that query alone.
Be sure to use it on that query alone - ie, re-enable it afterwards,
or discard the connection.

pgsql-performance by date:

Previous
From: Alessandro Gagliardi
Date:
Subject: Re: Why should such a simple query over indexed columns be so slow?
Next
From: Fernando Hevia
Date:
Subject: Re: Why should such a simple query over indexed columns be so slow?