Re: Re: How to keep at-most N rows per group? periodic DELETEs or constraints or..?

From: "Jamie Tufnell" <diesql(at)googlemail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Re: How to keep at-most N rows per group? periodic DELETEs or constraints or..?
Date: 2008-01-09 23:30:42
Message-ID: b0a4f3350801091530j56454688m27adfdb6eb28bc77@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 1/9/08, Erik Jones <erik(at)myemma(dot)com> wrote:
> On Jan 9, 2008, at 1:09 PM, Scott Marlowe wrote:
> > On Jan 9, 2008 12:20 PM, Steve Midgley <public(at)misuse(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Chinyi Woo 2008-01-10 03:13:56 Support for SQL TOP clause?
Previous Message Erik Jones 2008-01-09 20:17:39 Re: Re: How to keep at-most N rows per group? periodic DELETEs or constraints or..?