Re: performance problem with LIMIT (order BY in DESC order). Wrong index used? - Mailing list pgsql-performance

From Claudio Freire
Subject Re: performance problem with LIMIT (order BY in DESC order). Wrong index used?
Date
Msg-id BANLkTikvbf6zfOZg1KB=1prAyMNPkA=ubQ@mail.gmail.com
Whole thread Raw
In response to Re: performance problem with LIMIT (order BY in DESC order). Wrong index used?  (Dieter Rehbein <dieter.rehbein@skiline.cc>)
Responses Re: performance problem with LIMIT (order BY in DESC order). Wrong index used?  (tv@fuzzy.cz)
Re: performance problem with LIMIT (order BY in DESC order). Wrong index used?  (Dieter Rehbein <dieter.rehbein@skiline.cc>)
List pgsql-performance
On Tue, Apr 12, 2011 at 10:59 AM, Dieter Rehbein
<dieter.rehbein@skiline.cc> wrote:
> I just executed a VACUUM ANALYZE and now everything performs well. hm, strange.

That probably means you need more statistics - try increasing the
newsfeed's statistics target count.

ALTER TABLE newsfeed_item ALTER COLUMN newsfeed SET STATISTICS <n>;

Try different <n> numbers, you can crank it up to 4000 or perhaps more
in 9.0, but you should start lower I guess.

pgsql-performance by date:

Previous
From: Dieter Rehbein
Date:
Subject: Re: performance problem with LIMIT (order BY in DESC order). Wrong index used?
Next
From: tv@fuzzy.cz
Date:
Subject: Re: performance problem with LIMIT (order BY in DESC order). Wrong index used?