Solved

How many partitions a table should have

Posted on 2012-03-18
8
301 Views
Last Modified: 2012-06-27
We have 4 instances RAC on 11.1.0.7 and ASM.
We have multiple tables having billions of records and need to decide in how many partition a table should be partitioned to get the optimum performance.
In the given situation I have below 2 questions.

1. Which column/s (type) are best candidate for partition?
2. Which type of partition is best?

Is there any already proved method with statistics to decide the same?
0
Comment
Question by:YBSolutions
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 16

Expert Comment

by:Walter Ritzel
ID: 37734569
Using my previous experience and most of the examples found in the web, the best fields for partition keys are date fields. What will be really tricky is to determine the best size for the partition: It will be a week, 2 weeks, a month, a quarter, or even a year? The answer for that lay upon how are you going to query this table, the most common date filter.... because for the query be fast, the objective is to touch the less number of partitions possible.
On the type, I would say best is the ones that generates new partitions automatically.
Partitions could be done by other fields, like numeric ones, but then the strategy seems to be arbitrary, because separate the data in numeric ranges, in terms of query does not help much to select the least possible number of partitions.
0
 

Author Comment

by:YBSolutions
ID: 37734594
Could you provide me some links or metalink note id?
So that I could explore more with examples.
0
 
LVL 16

Accepted Solution

by:
Walter Ritzel earned 167 total points
ID: 37734632
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 23

Assisted Solution

by:David
David earned 167 total points
ID: 37734858
Date-based options are always popular, but the question is, what makes most sense for your organization's needs.  An example is to segregate by product line, or geographic location.
0
 
LVL 5

Expert Comment

by:Bajwa
ID: 37735367
1. Which column/s (type) are best candidate for partition?

Depends upon the partition key of the table (data), your needs.  I.e. if you have a table that
gets partitioned by Region (europe, Asia, Africa, America, Australia) then you have a 5 partitions in a list partitions., then you can further partition these 5 into range partition or so forth.  But the partitioning columns are always the data depended.

Then you can decided whether partitioning the table for performance is worth or not for each table.


2. Which type of partition is best?

Again!! It depends upon your data.  Range Partition (with DSS/BI) systems is very popular mostly with date.  I.e. you keep a rolling window of last 7 years data (for HIPAA) while each month (after ETL) you archive the oldest partition.  

For an OLTP inventory system product Id ragne or Price could be partition.
0
 
LVL 29

Assisted Solution

by:MikeOM_DBA
MikeOM_DBA earned 166 total points
ID: 37739187
1. Which column/s (type) are best candidate for partition?
Taking into consideration the above suggestions, look at the histograms for the columns you will use for partitioning, specially the cardinality.

2. Which type of partition is best?
The type of partitioning will depend (as stated above) on the type and data of the columns selected. You will be able to estimate the sizes of the partitions (in rows and GB) using these histograms.

Good luck!
:p
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37753321
YBSolutions,

Since you are active here please return to your previous question and answer my question I asked:

http://www.experts-exchange.com/Database/Oracle/Q_27624619.html
0
 

Author Closing Comment

by:YBSolutions
ID: 37803365
Thanks it helped to make the decision.
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
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.

688 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