dbTalk Databases Forums  

10g: parallel pipelined table func - compensating hash() function forparallel_enable clause

comp.databases.oracle.server comp.databases.oracle.server


Discuss 10g: parallel pipelined table func - compensating hash() function forparallel_enable clause in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Frank Bergemann
 
Posts: n/a

Default 10g: parallel pipelined table func - compensating hash() function forparallel_enable clause - 01-25-2012 , 04:24 AM






Hi,

How can i compensate the oracle hash function for

parallel_enable(partition myCursor by hash(Some_Key))

Because Some_Key is already a good ID to dispatch to the table
functions.
For a bulk i have e.g. #10 Some_Key values with nearly the same
#number of records per Some_Key value.
This means a balanced load distribution to the parallel pipelined
table function instances.
However oracle requiring hash(Some_Key) undermines the load balancing
(the same for range(Some_Key)).

So i would like to translate Some_Key to a value, that after
hash(Some_Key) results in ID (Some_Key) used for dispatch - some kind
of anti-hash.

So functionally speaking it ends up in

parallel_enable(partition myCursor by hash(antihash(Some_Key)))

.... which effectively is

parallel_enable(partition myCursor by SomeKey)


What's the anti-hash (inverse) function, which compensates for
hash(Some_Key)?

- many thanks!

regards,
Frank

Reply With Quote
  #2  
Old   
Robert Klemme
 
Posts: n/a

Default Re: 10g: parallel pipelined table func - compensating hash() functionfor parallel_enable clause - 01-25-2012 , 10:40 AM






On Wednesday, January 25, 2012 11:24:58 AM UTC+1, Frank Bergemann wrote:
Quote:
Hi,

How can i compensate the oracle hash function for

parallel_enable(partition myCursor by hash(Some_Key))

Because Some_Key is already a good ID to dispatch to the table
functions.
For a bulk i have e.g. #10 Some_Key values with nearly the same
#number of records per Some_Key value.
This means a balanced load distribution to the parallel pipelined
table function instances.
However oracle requiring hash(Some_Key) undermines the load balancing
(the same for range(Some_Key)).
Why is it the same for range partitioning?

Quote:
So i would like to translate Some_Key to a value, that after
hash(Some_Key) results in ID (Some_Key) used for dispatch - some kind
of anti-hash.

So functionally speaking it ends up in

parallel_enable(partition myCursor by hash(antihash(Some_Key)))

... which effectively is

parallel_enable(partition myCursor by SomeKey)


What's the anti-hash (inverse) function, which compensates for
hash(Some_Key)?
Hash functions do not have an inverse function because they are not injections.

http://en.wikipedia.org/wiki/Inverse_function

Kind regards

robert

Reply With Quote
  #3  
Old   
Frank Bergemann
 
Posts: n/a

Default Re: 10g: parallel pipelined table func - compensating hash() functionfor parallel_enable clause - 01-26-2012 , 02:21 AM



Hi Robert,

On 25 Jan., 17:40, Robert Klemme <shortcut... (AT) googlemail (DOT) com> wrote:
Quote:
On Wednesday, January 25, 2012 11:24:58 AM UTC+1, Frank Bergemann wrote:
Hi,

How can i compensate the oracle hash function for

* *parallel_enable(partition myCursor by hash(Some_Key))

Because Some_Key is already a good ID to dispatch to the table
functions.
For a bulk i have e.g. #10 Some_Key values with nearly the same
#number of records per Some_Key value.
This means a balanced load distribution to the parallel pipelined
table function instances.
However oracle requiring hash(Some_Key) undermines the load balancing
(the same for range(Some_Key)).

Why is it the same for range partitioning?

So i would like to translate Some_Key to a value, that after
hash(Some_Key) results in ID (Some_Key) used for dispatch - some kind
of anti-hash.

So functionally speaking it ends up in

* *parallel_enable(partition myCursor by hash(antihash(Some_Key)))

... which effectively is

* *parallel_enable(partition myCursor by SomeKey)

What's the anti-hash (inverse) function, which compensates for
hash(Some_Key)?

Hash functions do not have an inverse function because they are not injections.

http://en.wikipedia.org/wiki/Inverse_function

Kind regards

robert
I have to correct myself - i don't need an inverse "function" in terms
of mathematics.
That is not possible, because hashing compacts the number space
resulting in (minimized) clashing.
So it is not n:1 in forward direction and 1:n in backwards direction -
so no function.
But i just need *some* back-mapping.
And i found a way:
Create a look-up table for the forward mapping and use it in inverse
direction (fortunately i have only a small set of input values).

best regards,
Frank

Reply With Quote
  #4  
Old   
Frank Bergemann
 
Posts: n/a

Default Re: 10g: parallel pipelined table func - compensating hash() functionfor parallel_enable clause - 01-26-2012 , 02:22 AM



On 26 Jan., 09:21, Frank Bergemann <FBergem... (AT) web (DOT) de> wrote:
Quote:
Hi Robert,

On 25 Jan., 17:40, Robert Klemme <shortcut... (AT) googlemail (DOT) com> wrote:









On Wednesday, January 25, 2012 11:24:58 AM UTC+1, Frank Bergemann wrote:
Hi,

How can i compensate the oracle hash function for

* *parallel_enable(partition myCursor by hash(Some_Key))

Because Some_Key is already a good ID to dispatch to the table
functions.
For a bulk i have e.g. #10 Some_Key values with nearly the same
#number of records per Some_Key value.
This means a balanced load distribution to the parallel pipelined
table function instances.
However oracle requiring hash(Some_Key) undermines the load balancing
(the same for range(Some_Key)).

Why is it the same for range partitioning?

So i would like to translate Some_Key to a value, that after
hash(Some_Key) results in ID (Some_Key) used for dispatch - some kind
of anti-hash.

So functionally speaking it ends up in

* *parallel_enable(partition myCursor by hash(antihash(Some_Key)))

... which effectively is

* *parallel_enable(partition myCursor by SomeKey)

What's the anti-hash (inverse) function, which compensates for
hash(Some_Key)?

Hash functions do not have an inverse function because they are not injections.

http://en.wikipedia.org/wiki/Inverse_function

Kind regards

robert

I have to correct myself - i don't need an inverse "function" in terms
of mathematics.
That is not possible, because hashing compacts the number space
resulting in (minimized) clashing.
So it is not n:1 in forward direction and 1:n in backwards direction -
so no function.
But i just need *some* back-mapping.
And i found a way:
Create a look-up table for the forward mapping and use it in inverse
direction (fortunately i have only a small set of input values).

best regards,
Frank
sorry, there's a type: it should have been:

So it is n:1 in forward direction and 1:n in backwards direction - so
no function.

best regards,
Frank

Reply With Quote
  #5  
Old   
Frank Bergemann
 
Posts: n/a

Default Re: 10g: parallel pipelined table func - compensating hash() functionfor parallel_enable clause - 01-26-2012 , 02:24 AM



On 26 Jan., 09:21, Frank Bergemann <FBergem... (AT) web (DOT) de> wrote:
Quote:
Hi Robert,

On 25 Jan., 17:40, Robert Klemme <shortcut... (AT) googlemail (DOT) com> wrote:









On Wednesday, January 25, 2012 11:24:58 AM UTC+1, Frank Bergemann wrote:
Hi,

How can i compensate the oracle hash function for

* *parallel_enable(partition myCursor by hash(Some_Key))

Because Some_Key is already a good ID to dispatch to the table
functions.
For a bulk i have e.g. #10 Some_Key values with nearly the same
#number of records per Some_Key value.
This means a balanced load distribution to the parallel pipelined
table function instances.
However oracle requiring hash(Some_Key) undermines the load balancing
(the same for range(Some_Key)).

Why is it the same for range partitioning?

So i would like to translate Some_Key to a value, that after
hash(Some_Key) results in ID (Some_Key) used for dispatch - some kind
of anti-hash.

So functionally speaking it ends up in

* *parallel_enable(partition myCursor by hash(antihash(Some_Key)))

... which effectively is

* *parallel_enable(partition myCursor by SomeKey)

What's the anti-hash (inverse) function, which compensates for
hash(Some_Key)?

Hash functions do not have an inverse function because they are not injections.

http://en.wikipedia.org/wiki/Inverse_function

Kind regards

robert

I have to correct myself - i don't need an inverse "function" in terms
of mathematics.
That is not possible, because hashing compacts the number space
resulting in (minimized) clashing.
So it is not n:1 in forward direction and 1:n in backwards direction -
so no function.
But i just need *some* back-mapping.
And i found a way:
Create a look-up table for the forward mapping and use it in inverse
direction (fortunately i have only a small set of input values).

best regards,
Frank
ups! there's a typo - it should have been

So it is n:1 in forward direction and 1:n in backwards direction - so
no function.

best regards,
Frank

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.