title: Choose an index for mysql table
body: <p><strong>The table</strong></p>
  
  <p>I got a table that contains price for some 1 000 000 articles. The articles got a uniques ID-number but the table contains prices from multiple stores. Thus if two stores got the same article the uniques ID will not be unique for the table.</p>
  
  <p><strong>Table Structure</strong></p>
  
  <p>table articles</p>
  
  <p>id INT</p>
  
  <p>price IN</p>
  
  <p>store VARCHAR(40)</p>
  
  <p><strong>Daily use</strong></p>
  
  <p>Except for queries using the ID-number by users I need to run daily updates where data from csv-files insert/update each article in the table. The choosen procedure is to try to select an article and then perform either an insert or an update.</p>
  
  <p><strong>Question</strong></p>
  
  <p>With this in mind, which key should I choose?</p>
  
  <p>Here are some solutions that Ive been considering:</p>
  
  <ul>
  <li><code>FULLTEXT</code> index of the fields <code>isbn</code> and <code>store</code></li>
  <li>Add a field with a value <code>generated by</code> <code>isbn</code> and <code>store</code> that is set as <code>PRIMARY</code> key</li>
  <li>One table per store and use <code>isbn</code> as <code>PRIMARY</code> key</li>
  </ul>