MySQL Forums
Forum List  »  General

Re: Indexing questions
Posted by: David Shrewsbury
Date: November 08, 2006 09:58AM

> 1. Does this mean people usually have several composite indexes? Doesn't this affect INSERT speeds?

Yes and yes. The more indexes you have, the slower inserts will be. You have to experiment to find the proper balance of SELECT speed and INSERT speed.

> 2. How should I optimize the COUNT function? My tables are MyISAM already.

A count(*) query can be optimized just like any other query. Do an EXPLAIN on your query to make sure indexes are being used. Chapter 7 of the Reference Manual (see http://dev.mysql.com/doc/refman/5.0/en/optimization.html) has some good information on optimization techniques.

-Dave

Options: ReplyQuote


Subject
Written By
Posted
November 08, 2006 07:01AM
November 08, 2006 08:07AM
November 08, 2006 09:36AM
Re: Indexing questions
November 08, 2006 09:58AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.