[pLog-svn] big LT database

Christoph Feddersen feddersen at herr-der-ringe-film.de
Tue May 2 21:19:00 GMT 2006


No, blog_id can be removed.
Why? You currently have two indexes that are indexing the blog_id column.
"blog_id" is a single column index and "blog_id_slug" is a multi column
index.
MySQL is able to use multi-column indexes to optimzie a query even if
you're using only one column in your WHERE condition. Also it has to be
leftmost one.

Details:
http://dev.mysql.com/doc/refman/4.1/en/mysql-indexes.html

Jon Daley wrote:
> I figured that was the problem.
> 
> My main question was I think you said this was a bad idea:
>   INDEX blog_id (blog_id),
>   INDEX slug (slug),
>   INDEX blog_id_slug (blog_id,slug),
> 
> That the blog_id_slug should be removed, because it doesn't do anything,
> correct?
> 
> Thanks for your help.
> 
> On Tue, 2 May 2006, Christoph Feddersen wrote:
>> Too much emails error -  please ask again. ;)
> _______________________________________________
> 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