You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Christopher Bergström <cb...@netsyncro.com> on 2006/03/27 19:40:24 UTC

PostgreSQL C functions

I've been reading archives from blogs, postgres mailing lists and here.  
After some testing I do seem to get the best results from the 
suggestions by Tom Lane.  My scheme minus the GREATEST/LEAST [1] is the 
same as the suggestions.

1) I'm not certain my sa_bayes scheme is error free (Should I pull from 
SVN/snapshot/tarball or is there maybe something not even filed upstream 
I should look at?)
2) Based on my benchmarks alone I see positive performance gains, but 
still want to ask the list for feedback. [2]
3) It's been discussed to rework the Perl module.. Please pardon me for 
not just looking if there's an included TODO, but have most of the 
suggestions been a) filed upstream and or b) integrated in the latest 
release.

Bottom line question is this : Should I post my scheme based on Tom 
Lane's suggestions, make sure that it's solid/error free or is there a 
scheme with functions already that I should convert?

Most Kind Regards,

Christopher Bergström



[1] Starting at PostgreSQL 8.1.x has built-in GREATEST/LEAST iirc
[2] After each set of changes I ran the test twice (minus run 6) The 
specs on this test box were very low..  AMD Athlon bogomips : 
2092.08/256MB ram, and Raptor hd. (, but it's running at udma5 not 6 
because I haven't patched the controller module) I've misplaced the link 
to the test case, but searching on the postgres mailing lists for 
Spamassassin should bring some results. (Or I can just upload.) 

1st)
real    13m16.751s
user    0m20.189s
sys     0m3.900s

real    13m18.431s
user    0m20.237s
sys     0m3.912s

2nd)
real    13m11.233s
user    0m19.233s
sys     0m4.004s

real    13m13.561s
user    0m19.269s
sys     0m4.020s

3rd)
real    4m2.857s
user    0m19.513s
sys     0m3.812s

real    4m4.051s
user    0m19.549s
sys     0m3.840s

4th)
real    3m33.875s
user    0m19.773s
sys     0m3.736s


real    3m34.756s
user    0m19.821s
sys     0m3.748s

5th)
real    3m25.737s
user    0m18.709s
sys     0m4.808s


real    3m27.085s
user    0m18.761s
sys     0m4.820s

* Here is where I changed the SQL per Tom Lane's recommendations (I was 
too lazy to run twice, sorry)
6th)
real    2m16.640s
user    0m17.589s
sys     0m4.644s