After a long battle with technology, [EMAIL PROTECTED] ("Ed L."), an earthling, wrote:
> On Monday February 23 2004 10:23, Tom Lane wrote:
>> "Ed L." <[EMAIL PROTECTED]> writes:
>> Depending on the size of mytable, you might need an "ANALYZE doomed"
>> in there, but I'm suspecting not. A quick exp
[EMAIL PROTECTED] ("Ed L.") wrote:
> A 7.3.4 question...
>
> I want to "expire" some data after 90 days, but not delete too
> much at once so as not to overwhelm a system with precariously
> balanced disk I/O and on a table with millions of rows. If I
> could say it the way I think for a simple e
On Monday February 23 2004 10:23, Tom Lane wrote:
> "Ed L." <[EMAIL PROTECTED]> writes:
> > If I could say it the way I think for a simple example, it'd be
> > like this:
> >
> > delete from mytable
> > where posteddatetime < now() - '90 days'
> > limit 100;
> >
> > Of course, that's no
"Ed L." <[EMAIL PROTECTED]> writes:
> If I could say it the way I think for a simple example, it'd be
> like this:
> delete from mytable
> where posteddatetime < now() - '90 days'
> limit 100;
> Of course, that's not legal 7.3.4 syntax.
Assuming you have a primary key on the ta
On Mon, Feb 23, 2004 at 19:10:57 -0700,
"Ed L." <[EMAIL PROTECTED]> wrote:
>
> A 7.3.4 question...
>
> I want to "expire" some data after 90 days, but not delete too
> much at once so as not to overwhelm a system with precariously
> balanced disk I/O and on a table with millions of rows. If I
Of course, that's not legal 7.3.4 syntax. These are both too
slow due to sequential scan of table:
delete from mytable where key in (
select key
from mytable
where posteddatetime < now() - '90 days'
limit 100);
Upgrade to 7.4