We help IT Professionals succeed at work.
Get Started

optimize query -

Nura111
Nura111 asked
on
512 Views
Last Modified: 2012-05-11
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

Comment
Watch Question
Senior Software Engineer
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE