Solved

hash partition

Posted on 2011-03-16
3
655 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
Comment Utility
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
Comment Utility
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
Comment Utility
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.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Oracle PL/SQL syntax 4 52
oracle query help 29 62
Oracle Syntax 8 38
Need a replacement data type in Oracle 6 24
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now