Hello,
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("SE LECT * FROM articles WHERE category='Scien ce_Fiction'
AND story_id='45'") ;
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?
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("SE LECT * FROM articles WHERE category='Scien ce_Fiction'
AND story_id='45'") ;
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?
Comment