Re: [PERFORM] [PERFORMANCE] slow small delete on large table

2004-06-07 Thread Christopher Browne
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

Re: [PERFORM] [PERFORMANCE] slow small delete on large table

2004-06-07 Thread Christopher Browne
[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

Re: [PERFORM] [PERFORMANCE] slow small delete on large table

2004-02-24 Thread Ed L.
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

Re: [PERFORM] [PERFORMANCE] slow small delete on large table

2004-02-23 Thread Tom Lane
"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

Re: [PERFORM] [PERFORMANCE] slow small delete on large table

2004-02-23 Thread Bruno Wolff III
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

Re: [PERFORM] [PERFORMANCE] slow small delete on large table

2004-02-23 Thread Christopher Kings-Lynne
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