Questions tagged [ora-hash]

A simple Oracle hashing function.

ORA_HASH is a simple Oracle hashing function that returns a number.

Further reading:

12 questions
12
votes
2 answers

Is ora_hash deterministic?

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…
timmy
  • 1,752
  • 6
  • 23
  • 35
4
votes
1 answer

Is Oracle's ORA_HASH "random"?

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…
Jeremy
  • 5,365
  • 14
  • 51
  • 80
2
votes
1 answer

Faster hash with less collisions?

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…
toop
  • 10,834
  • 24
  • 66
  • 87
2
votes
0 answers

Oracle database, pl/sql code verification

I have had the need to verify that a particular pl/sql object (say a procedure) matches between development, test, and production environments. In order to compare and know with 100% certainty that the code matches, I have written a simple function…
Rob F.
  • 21
  • 1
2
votes
1 answer

How to use ora_hash on a column of datatype xmltype

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…
1
vote
0 answers

Would comparing two long strings using ora_hash faster than direct comparison in Oracle

I have two tables Table A and Table B. Both table have million rows and a column - column C where data type is "varchar2(3000)". Following is the schema: Create Table TableA ID number(20), C Varchar2(3000) Create Table TableB ID number(20), C…
E. L.
  • 502
  • 3
  • 16
1
vote
1 answer

Convert ORA_HASH to SQL Server

I am trying to convert an Oracle query to a SQL Server and facing an issue. Can you please help me ? Oracle Query: select ORA_HASH(SYS_GUID()) as SEGMENTID from my_Table I am looking for a function which is equivalent to ORA_HASH() function in SQL…
Sree Bhanu
  • 79
  • 2
  • 6
1
vote
1 answer

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

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…
wonton
  • 7,568
  • 9
  • 56
  • 93
0
votes
1 answer

fnv_hash() in Impala vs oracle hash value

how can we get same hash values in oracle db as same as impala. I have migrated tables and code from impala to oracle. Some of the queries are using hash values with FNV_HASH function in impala, Now we have to use the same has values in oracle as…
Ganesh galla
  • 15
  • 1
  • 4
0
votes
1 answer

Checksum of row using ora_hash giving different results for different users

Trying to generate a unique checksum for a data row in am Oracle table, for use in making sure that the row isn't changed between two users retrieving them and trying to update them at the same time. SELECT ora_hash( KY_REFUND_ID CD_STATUS ||…
VBartilucci
  • 477
  • 6
  • 17
0
votes
1 answer

ORACLE DISTINCT inside a function

I am trying to use the following on oracle 11g: select sum(ora_hash(distinct attribute) from table; This gives me the error:ORA-00936: "missing expression" I was expecting this to work, as for example sum(distinct attribute) from table; works…
mktz
  • 1
  • 1
0
votes
1 answer

Can ORA_HASH increase join/processing performance

I have (relatively) basic access rights to an 11G datawarehouse. Some of the processing I do involves joining big tables to big tables with some calculations or adding additional columns to a base set of data. I generally bring data into my own…