title: Is ora_hash deterministic?
body: <p>I am working with an Oracle database and I need to be able to partition the data in a table.  I understand that Rracle has an ora_hash function that can partition the data into buckets. Is the ora_hash function deterministic?</p>
  
  <p>In my program I will be making several different database queries with each query asking for a different bucket number.</p>
  
  <p>For example, in one query I might ask for the first two buckets:</p>
  
  <pre><code>SELECT * FROM sales WHERE ORA_HASH(cust_id, 9) in (0,1);
  </code></pre>
  
  <p>In a subsequent query I might ask for the 2nd and 3rd bucket:</p>
  
  <pre><code>SELECT * FROM sales WHERE ORA_HASH(cust_id, 9) in (1,2);
  </code></pre>
  
  <p>In the above example, will ora_hash always divide the table into the exact same 10 buckets? Assume that the data in the tables hasn't changed. Will the second bucket (bucket 1), be identical in both queries?</p>
  
  <p>There is documentation that suggests that <em>seed value</em> enables oracle to return different results for the same data set. So I am assuming that if I don't use <em>seed value</em>, then ora_hash will be deterministic.  See <a href="http://docs.oracle.com/cd/B13789_01/server.101/b10759/functions097.htm" rel="noreferrer">the documentation</a>.</p>