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

From Dieter Rehbein
Subject Re: performance problem with LIMIT (order BY in DESC order). Wrong index used?
Date
Msg-id CF07BFEA-8AFB-4EF8-BBB1-342F6EF23CC2@skiline.cc
Whole thread Raw
In response to Re: performance problem with LIMIT (order BY in DESC order). Wrong index used?  (Claudio Freire <klaussfreire@gmail.com>)
Responses Re: performance problem with LIMIT (order BY in DESC order). Wrong index used?  (Claudio Freire <klaussfreire@gmail.com>)
List pgsql-performance
what I did, was an ANALYZE, which did not change anything.

I just executed a VACUUM ANALYZE and now everything performs well. hm, strange.

thanks
Dieter



Am 12.04.2011 um 09:42 schrieb Claudio Freire:

On Tue, Apr 12, 2011 at 7:20 AM, Dieter Rehbein
<dieter.rehbein@skiline.cc> wrote:
> Hi everybody,
>
> I have a performance-problem with a query using a LIMIT. There are other threads rergading performance issues with
LIMIT,but I didn't find useful hints for our problem and it might 
> be interesting for other postgres-users.

Did you perform an ANALYZE or VACUUM ANALYZE?
Did you try increasing the statistic targets?

AFAIK, it looks a lot like the planner is missing stats, since it
estimates the index query on idx_nfi_newsfeed will fetch 10k rows -
instead of 25.


pgsql-performance by date:

Previous
From: Glyn Astill
Date:
Subject: Re: Linux: more cores = less concurrency.
Next
From: Claudio Freire
Date:
Subject: Re: performance problem with LIMIT (order BY in DESC order). Wrong index used?