[pLog-svn] big LT database

Jon Daley plogworld at jon.limedaley.com
Tue May 2 21:20:40 GMT 2006


 	But, we should leave the slug index?  I will read your link later 
- have to run.  When you say "left-most", you mean in the multi-column 
index listing, so that is why the slug index shouldn't be removed?

On Tue, 2 May 2006, Christoph Feddersen wrote:

> 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
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>

**************************************
Jon Daley
http://jon.limedaley.com/

If you want to make enemies, try to change something.
-- Woodrow Wilson


More information about the pLog-svn mailing list