troubleshooting Question

optimize query -

Avatar of Nura111
Nura111 asked on
MySQL ServerWordPress
8 Comments1 Solution515 ViewsLast Modified:
im trying to optimize queries on a wp database:
attched us the query from the slow log file and the results from a EXPLAIN on the query in .
phpmyadmin.

the site is on a shared host with other wp sites.


# Mon May 16 03:56:33 2011
# Query_time: 1.742733  Lock_time: 0.000106 Rows_sent: 1  Rows_examined: 1
SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ('category') AND t.slug = 'sports' ORDER BY t.name ASC

Explain results:
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t	const	PRIMARY,slug	slug	602	const	1	 
1	SIMPLE	tt	const	term_id_taxonomy,taxonomy	term_id_taxonomy	106	const,const	1

Open in new window

ASKER CERTIFIED SOLUTION
Walter Ritzel
Senior Software Engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros