Re: Really really slow select count(*)

From: "Pierre C" <lists(at)peufeu(dot)com>
To: felix <crucialfelix(at)gmail(dot)com>, "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
Cc: 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:19:17
Message-ID: op.vqhxafcueorkce@apollo13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


>> 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...

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Marlowe 2011-02-06 19:23:53 Re: Really really slow select count(*)
Previous Message Scott Marlowe 2011-02-06 19:05:37 Re: general hardware advice