Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Should I add a multi column index to MySQL?
February 6, 2005, 4:40 pm
rate this thread
I have a mysql table. Two columns in the table are used to pull out
stories from the table.
One of the columns stands for categories of the stories, and the other
column is the primary key and has the id for each story.
I am thinking of writing queries like this:
mysql_query("SELECT * FROM articles WHERE category='Science_Fiction'
I am wondering if I should create a multi column index that covers both
"categories" and "story_id" columns. -- INDEX (categories, story_id)
Would this increase performance?
- » php script that displays last uploaded jpg in a directory
- — Previous thread in » PHP Scripting Forum