title: Table design - advice needed
body: <p>I have a table of products which users have bought in the past. e.g.</p>
  
  <pre><code>item_id - user_id - title - supplier_id - - supplier_name - date added
  </code></pre>
  
  <p>table of users</p>
  
  <pre><code>user_id - name
  </code></pre>
  
  <p>I also have a table of suppliers e.g.</p>
  
  <pre><code>supplier_id - supplier_name
  </code></pre>
  
  <p>From time to time suppliers submit special offers which i then want to pass on to my users... this could be on one item or across the board.</p>
  
  <p>My question is how best to manage this</p>
  
  <p>Is it a case that when a user signs into the system i look through all the offers and then match them again either items bought in the past or against the supplier as a whole (if offer across the board)</p>
  
  <p>I'm thinking this might take hefty resources with say 100000 users and 1000 offers to look through which is a lot of querying.... or is there another way one would do this? maybe an interim table somewhere which would be easier to cross-reference.</p>
  
  <p>I have to write this immediately and want to make sure i do it as efficiently as possible but this is a new one on me hence the question.</p>
  
  <p>Is this a standard problem which has a simple solution?</p>
  
  <p>Thanks for any help.</p>