title: Should hibernate use unique sequences for each table?
body: <p>I have several entities using <code>AUTO</code> key generation strategy with <code>Hibernate</code> and <code>postgres</code>.</p>
  
  <pre><code>@Id
  @GeneratedValue(strategy=GenerationType.AUTO)
  private Long id;
  </code></pre>
  
  <p>This will result in a <code>hibernate_sequence</code> generated, and each entity will make use of that sequence when assigning keys.</p>
  
  <p>Now I have a table that has lots of cache data (like 100k entries), and some user tables. As both use strategy <code>AUTO</code>, they both get their keys from the same hibernate sequence. As a result, even if I only have 10 users, they will all have an id of 6-7 digits long, like <code>123123</code>.</p>
  
  <p>I wonder if, in general, one should introduce a custom sequence for each table? Or shouldn't I care about the id generation that much?</p>