pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Pierre C <lists@peufeu.com>
To: felix <crucialfelix@gmail.com>
To: Shaun Thomas <sthomas@peak6.com>
Cc: Scott Marlowe <scott.marlowe@gmail.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Really really slow select count(*)
Date: Sat, 05 Feb 2011 10:06:19 +0100
Message-ID: <op.vqe98ttzeorkce@apollo13> (raw )
In-Reply-To: <4D4C63A4.6090109@peak6.com >
References: <AANLkTinAJcm5A+i1O_R87aiYyu8N2OWgoaL9RfR=tUR9@mail.gmail.com >
<4D4C138C.7010304@2ndquadrant.com >
<4D4C1555.40209@peak6.com >
<AANLkTikrS5JkJDMjAXpcRWRnuLbX+MHB=CWb_mFa9qb-@mail.gmail.com >
<4D4C2AC3.5020804@peak6.com >
<AANLkTikN75hcCL5Nhgh8Z9c7ZLtduMdjsn07BgO_D_yZ@mail.gmail.com >
<AANLkTikpH2ws_iiyqNE-o-TWB0-5pMbrS0V5SymXBo2X@mail.gmail.com >
<AANLkTi=3n_W-OFVuVHx3Tthn_KiMN42BturJUS5BuWVz@mail.gmail.com >
<4D4C3BCA.5010808@peak6.com >
<AANLkTikjw46g=VD5vbkOfDz93JMX7vBijj7dTEs+LN4U@mail.gmail.com >
<4D4C46C2.1080108@peak6.com >
<AANLkTi=JC_qesUkZNZBRHVRtRZjR3JwSv9L7fLdskU-8@mail.gmail.com >
<AANLkTi=PsJkYJq1+-4a6OjOQOm3qaOn-HUz0VEdOv4LU@mail.gmail.com >
<AANLkTim+s+LcLWWjsf1cToPiDrrLxwO30PdN_3=U=7JO@mail.gmail.com >
<4D4C5AE6.4030101@peak6.com >
<AANLkTimw2izMi4QfizQm72ABePackWXhhUU9EHdNf3zk@mail.gmail.com >
<4D4C63A4.6090109@peak6.com >
On Fri, 04 Feb 2011 21:37:56 +0100, Shaun Thomas <sthomas@peak6.com> wrote:
> On 02/04/2011 02:14 PM, felix wrote:
>
>> oh and there in the footnotes to django they say "dont' forget to run
>> the delete expired sessions management every once in a while".
>> thanks guys.
>
> Oh Django... :)
>
>> it won't run now because its too big, I can delete them from psql though
>
> You might be better off deleting the inverse. You know, start a
> transaction, select all the sessions that *aren't* expired, truncate the
> table, insert them back into the session table, and commit.
Note that for a session table, that is updated very often, you can use the
postgres' HOT feature which will create a lot less dead rows. Look it up
in the docs.
view thread (66+ messages) latest in thread
Message-ID: <op.vqe98ttzeorkce@apollo13>
Permalink: ../op.vqe98ttzeorkce@apollo13/
Also on: postgresql.org/message-id/op.vqe98ttzeorkce@apollo13
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: lists@peufeu.com, crucialfelix@gmail.com, sthomas@peak6.com, scott.marlowe@gmail.com
Subject: Re: Really really slow select count(*)
In-Reply-To: <op.vqe98ttzeorkce@apollo13>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox