Results 1 to 2 of 2
Thread: Understanding Indexes... Or Not
Aug 25, 2002, 16:11 #1
- Join Date
- Nov 2001
- 0 Post(s)
- 0 Thread(s)
Understanding Indexes... Or Not
I've been purusing some of the MySQL documentation, particularly the pages on query optimisation. One thing which seems to come up again and again is the use of Indexes. And yet I've never used them! I understand the benifits of them, but don't see how they should be used, and in what circumstances they should be implemented.
Can anyone tell me how you know which columns should have an index, and what is the difference between the different type of Indexes i.e. Index, Unique and Fulltext.
I'd like to learn more about using Indexes but I didn't find the MySQL documentation on them all that helpful... can anyone point me in the direction of a good tutorial or article on Indexes?
Thanks in advance,Regards, Ant.
Aug 25, 2002, 16:36 #2
- Join Date
- Jul 2002
- Toronto, Canada
- 60 Post(s)
- 3 Thread(s)
to answer your immediate question, declare indexes on join columns and/or columns in WHERE clause search conditions
when the originating site has documentation that you find hard to read, try googling, specifically excluding that site using a search string like
mysql indexes -site:mysql.com
here are three of the better hits on the first page of results
Optimizing MySQL Queries and Indexes
Optimizing your MySQL Application
MySQL Performance Tuning -- How to Write Efficient MySQL Applications by Jeremy Zawodny (Senior Editor of Linux Magazine and the MySQL database expert at Yahoo! Finance)