Solved

hash partition

Posted on 2011-03-16
3
661 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 47

Accepted Solution

by:
schwertner earned 500 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 47

Assisted Solution

by:schwertner
schwertner earned 500 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Via a live example, show how to take different types of Oracle backups using RMAN.

785 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