On Fri, Aug 2, 2013 at 2:58 AM, Sergey Burladyan <eshkin...@gmail.com> wrote:
>
> PS: I think my main problem is here:
> select min(user_id) from items;
>  min
> -----
>    1
> (1 row)
>
> Time: 504.520 ms

That is a long time, but still 100 fold less than the planner is taking.

What about max(user_id)?

>
> also, i cannot reindex it concurrently now, because it run autovacuum: VACUUM 
> ANALYZE public.items (to prevent wraparound)

That is going to take a long time if you have the cost settings at
their defaults.

Cheers,

Jeff


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

Reply via email to