[Spam] Re: [bbDev] [688] trunk: indices for date columns.

Michael D Adams mikea at turbonet.com
Sun Feb 11 20:41:03 GMT 2007


On Feb 11, 2007, at 10:39 AM, Matt Mullenweg wrote:

> m at wordpress.org wrote:
>> +  KEY forum_id (forum_id),
>> +  KEY topic_time (topic_time)
>> +  KEY topic_start_time (topic_start_time)
>
> I'm skeptical of this.
>
> MySQL can only use one index per table per query, so if any  
> combination of those fields are used in queries for a true speed-up  
> we should use a multi-field key. (Like we do in WP.)

We should probably be doing a multiple column key on forum_id and  
topic_time (or the other way around).

The only place we really query by topic_start_time in when we're on  
profile pages.  Perhaps a muli column key with topic_start_time and  
topic_poster.

Michael


More information about the bbDev mailing list