Re: ORDER BY ... LIMIT and JOIN

From: Michael Andreen <harv(at)ruin(dot)nu>
To: pgsql-performance(at)postgresql(dot)org
Cc: Fizu <Fizu(at)advancedsl(dot)com(dot)ar>
Subject: Re: ORDER BY ... LIMIT and JOIN
Date: 2009-08-08 17:09:47
Message-ID: 200908081909.48708.harv@ruin.nu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Saturday 08 August 2009 08:02:47 Fizu wrote:
> -> Index Scan using country_ranking_user_idx on "user"
> (cost=0.00..6.49 rows=1 width=145) (actual time=0.023..57.633
> rows=57309 loops=1)
> Index Cond: (country_id = 1)

The planner is expecting one user with country_id = 1, but instead there are
57309. Have you analyzed recently? Maybe increasing the statistics target will
help.

/Michael

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Alvaro Herrera 2009-08-08 17:57:05 Re: [PERFORM] BUG #4919: CREATE USER command slows down system performance
Previous Message Tom Lane 2009-08-08 16:02:06 Re: [PERFORM] BUG #4919: CREATE USER command slows down system performance