From: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | Pierre C <lists(at)peufeu(dot)com> |
Cc: | felix <crucialfelix(at)gmail(dot)com>, sthomas(at)peak6(dot)com, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Really really slow select count(*) |
Date: | 2011-02-06 19:23:53 |
Message-ID: | AANLkTim_XnY1umze9S=hvGhUk9=C1ufb-sHOjL6EoOJS@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Sun, Feb 6, 2011 at 12:19 PM, Pierre C <lists(at)peufeu(dot)com> wrote:
>
>>> I have clustered that table, its still unbelievably slow.
>>
>> Did you actually delete the old entries before clustering it? if it's
>> still got 4G of old sessions or whatever in it, clustering ain't gonna
>> help.
>
> Also, IMHO it is a lot better to store sessions in something like memcached,
> rather than imposing this rather large load on the main database...
>
> PS : if your site has been down for 6 hours, you can TRUNCATE your sessions
> table...
Agreed. When I started where I am sessions were on pg and falling
over all the time. Because I couldn't change it at the time, I was
forced to make autovac MUCH more aggressive. I didn't have to crank
up fsm a lot really but did a bit. Then just ran a vacuum full /
reindex across the sessions table and everything was fine after that.
But we could handle 100x time the load for sessions with memcached I
bet.
From | Date | Subject | |
---|---|---|---|
Next Message | Pierre C | 2011-02-06 19:24:49 | Re: general hardware advice |
Previous Message | Pierre C | 2011-02-06 19:19:17 | Re: Really really slow select count(*) |