[pLog-svn] db optimization

Oscar Renalias oscar at renalias.net
Tue Apr 11 12:12:39 GMT 2006


It's from a plugin, the 'hostblock' plugin to be more precise.

But I recently changed this query, since mysql wasn't using the
indexes properly. Now the query looks something like the one below and
according to mysql's EXPLAIN output, it seems to be making a better
usage of the indexes defined on these two columns.

SELECT * FROM plog_host_blocking_rules WHERE blog_id IN (1,0)
AND block_type = 2;

If interested, get the pluging via svn from
http://deve.lifetype.net/svn/plog/plugins/trunk/hostblock

Oscar

On 4/11/06, Christoph Feddersen <feddersen at herr-der-ringe-film.de> wrote:
> Can somebody tell me where I can find this query in the sources:
> SELECT * FROM plog_host_blocking_rules WHERE blog_id = 1 OR blog_id = 0
> AND block_type = 2;
>
> I'm too stupid to find it in the 1.1 codebase.
>
> Thanks,
> 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