Skip to main content
1 of 6
cool
  • 165
  • 7

Should I separate table with a lot of columns and 3 index column?

I'm new to database stuff so I apologize if I say anything ridiculous. I have a database with 300 columns, which stores the score of 300 questions. There is also an "id-user" columns which is the primary key, and three more columns named "weekScore", "monthScore" and "yearScore". Every time a user answer a particular question the id will found and score will added to the particular column, and the score added to weekScore, monthScore and yearScore too. As you see there is a lot of queries go to this table. Question: I want to index three score columns (weekScore, monthScore and yearScore). is it better to separate these three columns and make another table because of the indexing?

cool
  • 165
  • 7