You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@issues.apache.org on 2010/06/03 20:43:47 UTC
[Bug 6444] tok_touch_all update forces full table scan, kills
performance.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6444
--- Comment #1 from Bradley Kieser <br...@kieser.net> 2010-06-03 14:43:44 EDT ---
Created an attachment (id=4768)
--> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4768)
Amended PgSQL.pm file with the optimised tok_touch_all
This file has the amended tok_touch_all function with the optimised update of
column atime (in a loop rather than using the IN operator).
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
Re: [Bug 6444] tok_touch_all update forces full table scan, kills
performance.
Posted by Karsten Bräckelmann <gu...@rudersport.de>.
> https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6444
>
> --- Comment #1 from Bradley Kieser <br...@kieser.net> 2010-06-03 14:43:44 EDT ---
> Created an attachment (id=4768)
> --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4768)
> Amended PgSQL.pm file with the optimised tok_touch_all
>
> This file has the amended tok_touch_all function with the optimised update of
> column atime (in a loop rather than using the IN operator).
Kind of wondering, does only PostgreSQL benefit from this re-write? No
gain with MySQL?
The patch is for PgSQL.pm only, though I do see (almost) identical code
in MySQL.pm (and SQL.pm).
--
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}