Forum Moderators: open

Message Too Old, No Replies

Index/indexes

Yes but...

         

henry0

8:59 pm on Feb 4, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Regards a site that will get some heavy traffic:
I am adding a "comment" capability within most of the site's sections.
Showing original content, comments, comments on comments etc...

Mysql says that in such a situation where very frequent updates will hapen creating an index or indexes could have some detrimental effects

What are your thoughts about the above statement?

thanks
Henry

coopster

11:34 pm on Feb 7, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



What occurs more, updates? Or views (SELECT)?

henry0

12:27 pm on Feb 8, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



About 75% more updates and 25% select
thanks

coopster

9:05 pm on Feb 9, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



In my personal experience I have always found indexes to be beneficial. The basic premise of storing data is that sooner or later you want to view that information, and view it in certain subsets or in a certain sort order. The bottom line is, you'll likely want that data indexed.

Can one make an argument for not requiring an index? Certainly! Especially if you are reading the data sequentially as opposed to seeking. I'm not certain where in the MySQL docs you read the statement you refer to in your first post but the manual page on Optimizing SELECT and Other Statements [dev.mysql.com] leads you more toward using indexes as opposed to leaving them out of your development.

henry0

9:57 pm on Feb 9, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thank you
I will read more and very probably will "index"
anyway before final release I will have a few hundreds testers trying to put it to its knees!
So I might test both modes.