Solved

How many partitions a table should have

Posted on 2012-03-18
8
294 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
8 Comments
 
LVL 15

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 15

Accepted Solution

by:
Walter Ritzel earned 167 total points
ID: 37734632
0
 
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
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.

 
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 76

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

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

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

746 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

13 Experts available now in Live!

Get 1:1 Help Now