ora-hash

How to use ora_hash on a column of datatype xmltype

笑着哭i 提交于 2019-12-28 19:36:17
问题 I would like to use ORA_HASH on xmltype datatype, and workarounds are straight forward solutions ? I am using oracle 11g r2 and binary xml as storage option for xmltype column Query which I used for creation of the table is create table samplebinary ( indexid number(19,0) , xmlcolumn xmltype not null) xmltype column xmlcolumn store as binary xml; 回答1: As you already know, ora_hash doesn't accept long or LOB values. You could pass in the first 4k or 32k of the XML content, but if you need to

How to implement ora_hash (seedable hash that divides any sql datatype into n buckets)

╄→尐↘猪︶ㄣ 提交于 2019-12-24 05:49:31
问题 I've looked at the wikipedia article on Hash tables but it doesn't seem to say anything about how to implement a hash table that can distribute entries of arbitrary SQL datatype evenly into n buckets. Can anyone point me in the direction of documentation or existing source code on this topic? 回答1: I believe you are talking about a perfect hash function. Oracle's ORA_HASH function is not a perfect hash function. http://en.wikipedia.org/wiki/Perfect_hash_function As close as you will get to

Faster hash with less collisions?

半腔热情 提交于 2019-12-12 09:08:16
问题 Which form of hashing would return the fastest results (and least chance of 2 results returning the same hash) when summing up the hash of all rows (10 million) for one column(could be NUMBER, VARCHAR, DATE, TIMESTAMP but no CLOBS,XML.etc)? This value would then be compared to the same operation on another table to check if all rows for that same column are exactly the same. SET SERVEROUTPUT ON DECLARE HASH_VAL NUMBER; begin DBMS_OUTPUT.PUT_LINE (OWA_OPT_LOCK.CHECKSUM('column_here')); DBMS

Is Oracle's ORA_HASH “random”?

蹲街弑〆低调 提交于 2019-12-07 07:23:35
问题 Ora_hash is deterministic in that the keeping the input and seed constant will produce a definite output. But, for any seed (including the default), will the output of an ora_hash necessarily have the property that: "No method exists that can be used to predict what the result of an ORA_HASH will be with any level of success higher than purely random guessing?" 回答1: Probably not, no. ORA_HASH is not designed as a particularly robust hashing algorithm-- it's certainly not something you would

Is Oracle's ORA_HASH “random”?

元气小坏坏 提交于 2019-12-05 18:13:29
Ora_hash is deterministic in that the keeping the input and seed constant will produce a definite output. But, for any seed (including the default), will the output of an ora_hash necessarily have the property that: "No method exists that can be used to predict what the result of an ORA_HASH will be with any level of success higher than purely random guessing?" Probably not, no. ORA_HASH is not designed as a particularly robust hashing algorithm-- it's certainly not something you would use as part of a cryptography library, for example, you'd use the DBMS_CRYPTO.HASH choosing an appropriate

Is ora_hash deterministic?

人盡茶涼 提交于 2019-11-29 03:50:25
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? In my program I will be making several different database queries with each query asking for a different bucket number. For example, in one query I might ask for the first two buckets: SELECT * FROM sales WHERE ORA_HASH(cust_id, 9) in (0,1); In a subsequent query I might ask for the 2nd and 3rd bucket: SELECT * FROM sales WHERE ORA_HASH(cust_id, 9) in (1,2); In the above

How to use ora_hash on a column of datatype xmltype

坚强是说给别人听的谎言 提交于 2019-11-28 11:49:54
I would like to use ORA_HASH on xmltype datatype, and workarounds are straight forward solutions ? I am using oracle 11g r2 and binary xml as storage option for xmltype column Query which I used for creation of the table is create table samplebinary ( indexid number(19,0) , xmlcolumn xmltype not null) xmltype column xmlcolumn store as binary xml; As you already know, ora_hash doesn't accept long or LOB values . You could pass in the first 4k or 32k of the XML content, but if you need to make sure that the entire XML document hasn't changed, that won't be sufficient. And as Ben mentioned, ora

Is ora_hash deterministic?

旧时模样 提交于 2019-11-27 17:48:20
问题 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? In my program I will be making several different database queries with each query asking for a different bucket number. For example, in one query I might ask for the first two buckets: SELECT * FROM sales WHERE ORA_HASH(cust_id, 9) in (0,1); In a subsequent query I might