title: Efficient Key/Value table
body: <p>I need a table for storing key/value pairs (like the Windows Registry).  Here is what I have:</p>
  
  <pre><code>CREATE TABLE REG         
  (                       
      ID VARCHAR(255) NOT NULL,
      DATA VARCHAR(1024),  
      PRIMARY KEY(ID)          
  );                       
  </code></pre>
  
  <p>I am using SQL Server 2008 R2, 2008, and 2005.</p>
  
  <p>Can anyone offer a more efficient idea to storing key/value pairs.</p>
  
  <p>I am storing keys like this:</p>
  
  <p>/USER/REX/AUTO_LOGIN = "T"</p>
  
  <p>/USER/REX/MESSAGE/1 = "This is a longer message"</p>
  
  <p>At about 10000 records I am already seeing performance issues.</p>