Opened 13 years ago

Closed 10 years ago

#420 closed defect (duplicate)

Update awl and bayes

Reported by: rjl Owned by: rjl
Priority: normal Milestone: 1.0.3
Component: SQL scripts Version: 1.0.2
Severity: normal Keywords: maia-pgsql.sql postgresql put_tokens greatest_int least_int


The put_tokens(), greatest_int(), and least_int() procedures specified in

[ SpamAssassin-3.1.7/sql/bayes_pg.sql] needs to be added to maia-pgsql.sql. More generally, this maia-pgsql.sql schema should be examined to bring it up to date with the SpamAssassin-supplied bayes_pg.sql.

Change History (3)

comment:1 Changed 13 years ago by anonymous

I've always wondered when stored procedures were necessary... and this may

be a real case. I wonder what the performance characteristics of this are compared to mysql, where we have observed some slowness on loarge sites, wrt bayes activity.

comment:2 Changed 13 years ago by anonymous

Stored procedures would probably help MySQL as well, but adding such a

thing would involve patching SpamAssassin to call those stored procedures--it involves more than just defining the procedures in the schema. The Mail::SpamAssassin::BayesStore::MySQL engine would need to be modified to use those stored procedures, in the same way that the Mail::SpamAssassin::BayesStore::PostgreSQL engine does for put_tokens() and such.

It's worth noting, though, that the SpamAssassin devs most likely opted for stored procedures for their PostgreSQL engine due to how poorly PostgreSQL performed with the generic SQL engine. The performance improvement is said to be very dramatic for PostgreSQL with this PostgreSQL-specific engine, whereas MySQL performed reasonably well with the generic SQL engine to begin with, so the MySQL-specific engine doesn't offer such dramatic improvements. Adding stored procedures to the MySQL engine would probably improve performance somewhat, but it would appear that the SpamAssassin devs decided it wasn't enough of an improvement to justify the additional complexity. The question, I suppose, is did they actually try stored procedures with MySQL, or were they simply using MySQL's out-of-the-box performance as the benchmark they wanted to raise the PostgreSQL Bayes engine's performance to?

comment:3 Changed 10 years ago by mortonda@…

  • Resolution set to duplicate
  • Status changed from new to closed
  • Summary changed from put_tokens(), greatest_int(), and least_int() need to be added to maia- to Update awl and bayes

#539 ... this ticket is obsolete by new sql code for SA 3.3.0

Note: See TracTickets for help on using tickets.