Slow query > nEwZ - sCRiPTz-TEAM.iNFO

Canal Rss Canal Rss
Canal Atom Canal Atom 

Slow query

Category: IPS Tracker - IP.Blog (for IP.Board)
Viewed: 9 times
Printerfriendly version version of Microsoft Word HTML version

Found this in the slow query logs. "Using where, using temporary, using filesort".

SELECT e.entry_id, e.entry_last_update, e.entry_name, e.blog_id, e.entry_name_seo, e.entry_author_id, e.entry_date,b.blog_name, b.blog_seo_name FROM ibf_blog_entries e LEFT JOIN ibf_blog_blogs b ON (
b.blog_id=e.blog_id ) WHERE b.blog_id IN (1174,2568) AND e.entry_status !='draft' AND b.blog_disabled = 0 AND b.blog_allowguests = 1 AND ( ( b.blog_owner_only=1 AND b.member_id=0 ) OR
b.blog_owner_only=0 ) AND ( b.blog_authorized_users LIKE '%,0,%' OR b.blog_authorized_users IS NULL ) ORDER BY e.entry_date DESC LIMIT 0,5;

We should try to optimize the query if possible. Some ideas (I'm not sure what triggers this query so I'm not sure what is feasible)

Sat, 21 January 2012