title: How do I partition efficiently in SQL Server based on foreign keys?
body: <p>I am working on SQL Server and want to create a partition on a table. I want to base it off of a foreign key which is in another table.</p>
  
  <pre><code>table1 (
     fk uniqueidentifier,
     data
  )
  </code></pre>
  
  <p>fk points to table2</p>
  
  <pre><code>table 2 (
      partition element here
  )
  </code></pre>
  
  <p>I want to partition table1 base on table2's data, ie if table2 contains categories</p>