[MTOS-dev] Feedback requested: changing 'junk_status' on comments and pings

Brad Choate brad at sixapart.com
Fri Apr 11 12:16:48 PDT 2008


On Apr 11, 2008, at 12:11 PM, Hirotaka Ogawa wrote:
>
> Brad, I can't believe this so soon.
>
> At least, in my environment (MySQL 5.0.45), both seem to be using  
> filesort:
>
> EXPLAIN SELECT * FROM mt_tbping WHERE (tbping_junk_status IN
> ('0','1')) AND (tbping_blog_id = '1') ORDER BY tbping_created_on DESC
> LIMIT 26;
> EXPLAIN SELECT * FROM mt_tbping WHERE (tbping_junk_status = '1') AND
> (tbping_blog_id = '1') ORDER BY tbping_created_on DESC LIMIT 26;

Are you using the latest branch? The indexes currently defined in  
release-34 should fix that. Specifically, the mt_tbping_blog_stat  
index (which is on blog_id + junk_status + created_on). If you don't  
have that index, try creating it and see if it changes:

	create index mt_tbping_blog_stat on mt_tbping (tbping_blog_id,  
tbping_junk_status, tbping_created_on)

-Brad

--
Brad Choate
Engineering Manager, Movable Type, Six Apart, Ltd.
http://www.sixapart.com/movabletype/
Mobile: (918) 271-0105  -  AIM: bschoate





More information about the MTOS-dev mailing list