Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

hash partition

Posted on 2011-03-16
3
Medium Priority
?
696 Views
Last Modified: 2012-05-11
Is a hash partition better suited for a table's column with high or low cardinality?
0
Comment
Question by:msimons4
  • 2
3 Comments
 
LVL 48

Accepted Solution

by:
schwertner earned 2000 total points
ID: 35148826
Oracle says:

Hash partitioning maps data to partitions based on a hashing algorithm that Oracle applies to the partitioning key that you identify. The hashing algorithm evenly distributes rows among partitions, giving partitions approximately the same size.

Hash partitioning is the ideal method for distributing data evenly across devices. Hash partitioning is also an easy-to-use alternative to range partitioning, especially when the data to be partitioned is not historical or has no obvious partitioning key.

My comment is that if you have big amount of data that is randomly used you can spread the data on different disk devices to reduce the contention. But if you can somehow to range the data and the select statements in your application use data grouped in ranges, intervals and so on the hash partitioning is not a good decission.

The cardinality can affect the hash partitioning only by high cardinality. In this case if you select rows thre is no waranty that they sit in same partition. So spreading them on different devices can paralelize the query and be winning.

But if you can group the rows belonging to one search criteria in one partition - this will be the best solution. But this is range hashing.....
0
 

Author Comment

by:msimons4
ID: 35148886
Range hashing is not an option since there is no range in the search condition. So I have this table with 45 columns, do I list every column in the hash partition or do I list the columns in the index or do I list the columns in the PK ect? How do I determine which columns to list in the hash partition?
0
 
LVL 48

Assisted Solution

by:schwertner
schwertner earned 2000 total points
ID: 35151658
The index(es) depend(s) on the select statement(s) you use.

The primary key (PK) is a must if this is not a datewarehouse.
In OLTP is row has to have PK. Even in DW the rows have to have PK because references will be almost impossible.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that useā€¦
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question