Re: [dspam-users] Postgres vs. MySQL - Mailing list pgsql-performance

From Lionel Bouton
Subject Re: [dspam-users] Postgres vs. MySQL
Date
Msg-id 41A85386.8070407@bouton.name
Whole thread Raw
In response to Re: [dspam-users] Postgres vs. MySQL  ("Casey Allen Shobe" <cshobe@osss.net>)
List pgsql-performance
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

pgsql-performance by date:

Previous
From: "Casey Allen Shobe"
Date:
Subject: Re: [dspam-users] Postgres vs. MySQL
Next
From: Christopher Browne
Date:
Subject: Re: [dspam-users] Postgres vs. MySQL