Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: users

event table - purging

 

 

Bricolage users RSS feed   Index | Next | Previous | View Threaded


michael.fletcher at cbs

Dec 4, 2012, 1:18 PM

Post #1 of 4 (376 views)
Permalink
event table - purging

Hello,

Is there any performance benefit to purging old records from the event table, like there is for the job table?

If so, has someone already written the SQL for this by chance, including the related tables?

Thank you,

Michael Fletcher


david at justatheory

Dec 4, 2012, 4:27 PM

Post #2 of 4 (359 views)
Permalink
Re: event table - purging [In reply to]

On Dec 4, 2012, at 1:18 PM, "Fletcher, Michael" <michael.fletcher [at] cbs> wrote:

> Is there any performance benefit to purging old records from the event table, like there is for the job table?

Probably not, unless you often look at the events, and especially if you have an object with a gazillion events and you want to see them. How big is your events table? A query something like this should tell you:

SELECT pg_size_pretty(pg_total_relation_size(oid::regclass) from pg_class WHERE relname = 'event';

Best,

David


michael.fletcher at cbs

Dec 5, 2012, 1:14 PM

Post #3 of 4 (357 views)
Permalink
RE: event table - purging [In reply to]

On Tuesday, December 04, 2012 4:27 PM David E. Wheeler wrote:

> How big is your events table?

7995 MB
48462844 records
First record timestamp: 2009-09-29

Thanks,
Mike


-----Original Message-----
From: users [at] lists [mailto:users [at] lists] On Behalf Of David E. Wheeler
Sent: Tuesday, December 04, 2012 4:27 PM
To: users [at] lists
Subject: Re: event table - purging

On Dec 4, 2012, at 1:18 PM, "Fletcher, Michael" <michael.fletcher [at] cbs> wrote:

> Is there any performance benefit to purging old records from the event table, like there is for the job table?

Probably not, unless you often look at the events, and especially if you have an object with a gazillion events and you want to see them. How big is your events table? A query something like this should tell you:

SELECT pg_size_pretty(pg_total_relation_size(oid::regclass) from pg_class WHERE relname = 'event';

Best,

David


david at justatheory

Dec 26, 2012, 9:36 AM

Post #4 of 4 (320 views)
Permalink
Re: event table - purging [In reply to]

On Dec 5, 2012, at 1:14 PM, "Fletcher, Michael" <michael.fletcher [at] cbs> wrote:

>> How big is your events table?
>
> 7995 MB
> 48462844 records
> First record timestamp: 2009-09-29

8G is pretty big, but unless you look at it regularly, I don't think it would be in memory. I doubt that it causes much problem with your system, unless your database server is under-powered. How much RAM does it have? And how is PostgreSQL configured (see http://bricolagecms.org/docs/current/api/Bric::DBA#Tuning for details)?

That aside, if you really want to delete stuff, maybe remove events associated with deactivated objects, or event from, say, before 2011-01-01. I don’t think it will cause any harm, except to the extent that you will of course no longer have access to those older events. And unless you care about them for auditing purposes, or you access them in your templates for some reason (some folks search a story for the first publish event in order to display a data, for example), it should be fine.

Best,

David

Bricolage users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.