pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jamie Tufnell <diesql@googlemail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Re: How to keep at-most N rows per group? periodic DELETEs or constraints or..?
Date: Wed, 9 Jan 2008 23:30:42 +0000
Message-ID: <b0a4f3350801091530j56454688m27adfdb6eb28bc77@mail.gmail.com> (raw)
In-Reply-To: <A92379CF-963E-4670-9E22-21225B927EF8@myemma.com>
References: <20080109152431.79AFF2E02F6@postgresql.org>
	<20080109182115.6E39C2E3239@postgresql.org>
	<dcc563d10801091109kf80ce2dh97b8e4a548f5168f@mail.gmail.com>
	<A92379CF-963E-4670-9E22-21225B927EF8@myemma.com>

On 1/9/08, Erik Jones <erik@myemma.com> wrote:
> On Jan 9, 2008, at 1:09 PM, Scott Marlowe wrote:
> > On Jan 9, 2008 12:20 PM, Steve Midgley <public@misuse.org> wrote:
> >> This is kludgy but you would have some kind of random number test at
> >> the start of the trigger - if it evals true once per every ten
> >> calls to
> >> the trigger (say), you'd cut your delete statements execs by about
> >> 10x
> >> and still periodically truncate every set of user rows fairly
> >> often.
> >
> > And, if you always through a limit 50 on the end of queries that
> > retrieve data, you could let it grow quite a bit more than 60 or 70...
> > Say 200.  Then you could have it so that the random chopper function
> > only gets kicked off every 100th or so time.
>
> I like that idea.

I do too!  I'm going to have a shot at implementing this tomorrow.
Thanks for all your opinions guys :-)

Cheers,
Jamie



view thread (13+ messages)

Message-ID: <b0a4f3350801091530j56454688m27adfdb6eb28bc77@mail.gmail.com>
Permalink:  ../b0a4f3350801091530j56454688m27adfdb6eb28bc77@mail.gmail.com/
Also on:    postgresql.org/message-id/b0a4f3350801091530j56454688m27adfdb6eb28bc77@mail.gmail.com

 · 

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-sql@postgresql.org
  Cc: diesql@googlemail.com
  Subject: Re: Re: How to keep at-most N rows per group? periodic DELETEs or constraints or..?
  In-Reply-To: <b0a4f3350801091530j56454688m27adfdb6eb28bc77@mail.gmail.com>

* 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