Re: [PERFORM] Problems with an update-from statement and pg-8.1.4

2006-12-06 Thread Erik Jones
Rafael Martinez wrote: On Wed, 2006-12-06 at 14:19 -0600, Erik Jones wrote: Rafael Martinez wrote: On Wed, 2006-12-06 at 14:55 -0500, Ted Allen wrote: Stephan Szabo wrote: On Wed, 6 Dec 2006, Rafael Martinez wrote: mailstats=# EXPLAIN update

Re: [PERFORM] Problems with an update-from statement and pg-8.1.4

2006-12-06 Thread Rafael Martinez
On Wed, 2006-12-06 at 14:19 -0600, Erik Jones wrote: > Rafael Martinez wrote: > > On Wed, 2006-12-06 at 14:55 -0500, Ted Allen wrote: > > > >> Stephan Szabo wrote: > >> > >>> On Wed, 6 Dec 2006, Rafael Martinez wrote: > >>> > mailstats=# EXPLAIN update mail SET spamscore = '-5.0

Re: [PERFORM] Problems with an update-from statement and pg-8.1.4

2006-12-06 Thread Erik Jones
Rafael Martinez wrote: On Wed, 2006-12-06 at 14:55 -0500, Ted Allen wrote: Stephan Szabo wrote: On Wed, 6 Dec 2006, Rafael Martinez wrote: mailstats=# EXPLAIN update mail SET spamscore = '-5.026' FROM mail m, mail_received mr where mr.mail_id = m.mail_id AND mr.queue_id = '1Grx

Re: [PERFORM] Problems with an update-from statement and pg-8.1.4

2006-12-06 Thread Rafael Martinez
On Wed, 2006-12-06 at 14:55 -0500, Ted Allen wrote: > Stephan Szabo wrote: > > On Wed, 6 Dec 2006, Rafael Martinez wrote: > >> > >> mailstats=# EXPLAIN update mail SET spamscore = '-5.026' FROM mail m, > >> mail_received mr where mr.mail_id = m.mail_id AND mr.queue_id = > >> '1GrxLs-0004N9-I1' and

Re: [PERFORM] Problems with an update-from statement and pg-8.1.4

2006-12-06 Thread Ted Allen
Stephan Szabo wrote: On Wed, 6 Dec 2006, Rafael Martinez wrote: We are having some problems with an UPDATE ... FROM sql-statement and pg-8.1.4. It takes ages to finish. The problem is the Seq Scan of the table 'mail', this table is over 6GB without indexes, and when we send thousands of this

Re: [PERFORM] Problems with an update-from statement and pg-8.1.4

2006-12-06 Thread Stephan Szabo
On Wed, 6 Dec 2006, Rafael Martinez wrote: > We are having some problems with an UPDATE ... FROM sql-statement and > pg-8.1.4. It takes ages to finish. The problem is the Seq Scan of the > table 'mail', this table is over 6GB without indexes, and when we send > thousands of this type of statement,