pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Lionel Bouton <lionel-subscription@bouton.name>
To: Casey Allen Shobe <cshobe@osss.net>
Cc: Clifton Royston <cliftonr@tikitechnologies.com>
Cc: Evilio del Rio <edelrio@cmima.csic.es>
Cc: dspam-users@networkdweebs.com
Cc: pgsql-performance@postgresql.org
Subject: Re: [dspam-users] Postgres vs. MySQL
Date: Sat, 27 Nov 2004 11:14:30 +0100
Message-ID: <41A85386.8070407@bouton.name> (raw)
In-Reply-To: <35118.206.63.123.15.1101521473.squirrel@206.63.123.15>
References: <1101302058.338.74.camel@haddock.cmima.csic.es>
	<20041126203531.GC8991@tikitechnologies.com>
	<35118.206.63.123.15.1101521473.squirrel@206.63.123.15>

Casey Allen Shobe wrote the following on 11/27/04 03:11 :

>I posted about this a couple days ago on dspam-dev...
>
>I am using DSpam with PostgreSQL, and like you discovered the horrible
>performance.  The reason is because the default PostgreSQL query planner
>settings determine that a sequence scan will be more efficient than an
>index scan, which is wrong.  To correct this behavior, adjust the query
>planner settings for the appropriate table/column with this command:
>
>alter table "dspam_token_data" alter "token" set statistics 200; analyze;
>
>Let me know if it help you.  It worked wonders for me.
>
>  
>
In tum mode, this could help too (I'm currently testing it) :
CREATE INDEX id_token_data_sumhits ON dspam_token_data ((spam_hits + 
innocent_hits));

Indeed each UPDATE on dspam_token_data in TUM is done with :
WHERE ... AND spam_hits + innocent_hits < 50



view thread (12+ messages)  latest in thread

Message-ID: <41A85386.8070407@bouton.name>
Permalink:  ../41A85386.8070407@bouton.name/
Also on:    postgresql.org/message-id/41A85386.8070407@bouton.name

 · 

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-performance@postgresql.org
  Cc: lionel-subscription@bouton.name, cshobe@osss.net, cliftonr@tikitechnologies.com, edelrio@cmima.csic.es, dspam-users@networkdweebs.com
  Subject: Re: [dspam-users] Postgres vs. MySQL
  In-Reply-To: <41A85386.8070407@bouton.name>

* 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