[pLog-svn] db optimization

Oscar Renalias oscar at renalias.net
Sun Apr 2 12:36:17 GMT 2006


That's the bayesian filter, and no, it doesn't work with ajax.

The way it works, it trains the filter in a way so that it uses the
words of your post as non-matches. There is a query to check whether
the token is already in the db and another one to INSERT or UPDATE the
token and its spam probability. I can't see how to optimize this,
unless it is always running an UPDATE and if it fails, then try an
INSERT... I would need to look at the code.

If we're willing to try to use innodb to avoid full-table locking,
this looks like a good place to start.

Oscar

On 4/2/06, Christoph Feddersen <feddersen at herr-der-ringe-film.de> wrote:
>
> Jon Daley wrote:
> > I turned on slow query logging, and no-index queries.
>
> Can you send me the slow query log aswell as the logfile that contains
> all mysql queries?
>
>
> > The context has tons of these: SELECT/UPDATE pairs.
> <snip>
> > I made a post earlier, and I think there are two SQL queries for each
> > word I typed: 708 SQL queries in 2 seconds.
> Well, that should be optimized. Is that filter working with ajax? It
> seems to make a request and database query after typing in a new character?
>
> Christoph
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>


More information about the pLog-svn mailing list