Free Newsletters:
Database Journal  
DBAnews  

DBASupport

 The Knowledge Center for Oracle Professionals

Search DBAsupport:
 
HOME 11g Central 10g Central 9i Central 8i Central Oracle News Scripts FAQ OCP Zone Resources Technical Docs Tools & Utilities Forums
internet.com

» HOME
» FEATURES
    11g Central
    10g Central
    9i Central
    8i Central
    Oracle News
» COMMUNITY
    Scripts
    Forums
    FAQ
    OCP Zone
» RESOURCES
    Resources
    Technical Docs
    Tools & Utilities
    Tech Jobs

Marketplace Partners
Become a Marketplace Partner


internet.commerce
Be a Commerce Partner












internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


   DBAsupport.com > Oracle > Oracle 8i Central > Featured Stories




UNIX Administrator - Linux/Solaris (IL)
Next Step Systems
US-IL-Chicago

Justtechjobs.com Post A Job | Post A Resume

Partitioning is a way of breaking up tables and indexes into pieces, instead of storing them as one monolithic object. They have been introduced in Oracle 8 with range partitioning and in oracle 8i, two new partitioning types have been introduced : Hash and Composite.

Range Partitioning

This provides a way to partition an object based on the range of the partition key. The data is stored in different partitions based on the range of the partition key.

create table sales (
customer_id number(6),
sale_date date,
amount number(10) )
partition by range(sale_date) (
partition p1 values less than ('01-APR-1999') tablespace ts1,
partition p2 values less than ('01-JUL-1999') tablespace ts2,
partition p3 values less than ('01-OCT-1999') tablespace ts3,
partition p3 values less than (maxvalue) tablespace ts4
);

In the above example, dba wants to manage rolling data of sales by quarter. The partition to which the row belongs to, is decided based on the partition key(sale_date). This method makes data very manageable and highly available since individual partitions can be managed without affecting the other partitions of the table.

Hash Partitioning

Range partitioning is only good when defined partition boundaries and data patterns exist. In the example below the table is partitioned on customer_id and there is no good way of evenly distributing data with range partitioning. Hash Partitioning provides a very simple way to break data up into evenly sized containers to be spread across multiple devices.

create table sales (
customer_id number(6),
sale_date date,
amount number(10) )
partition by hash ( customer_id) (
partition p1 tablespace ts1,
partition p2 tablespace ts2,
partition p3 tablespace ts3,
partition p4 tablespace ts4 );

This is a good method to use when the number of partitions don't change and there are no defined data boundaries that you can partition on. The advantages are Good Data distribution and IO balancing.

Composite Partitioning

Hash partitioning is a combination of range and hash partitioning and provides superior manageability and availability benefits of range partitioning with the data distribution advantages of hash partitioning. In the following example, the table is broken into 4 partitions based on the sale_date range and again broken into 4 sub partitions based on the hashed key of customer_id. So, each tablespace will now hold 4 partitions and there will be a total of 16 partitions in this scheme.

create table sales (
customer_id number(6),
sale_date date,
amount number(10) )
PARTITION BY RANGE(sale_date)
SUB PARTITION BY HASH(customer_id)
SUB PARTITIONS 4
STORE IN(ts1,ts2,ts3,ts4)
( PARTITION p1 VALUES LESS THAN('01-APR-1999'),
PARTITION q2 VALUES LESS THAN('01-JUL-1999'),
PARTITION q3 VALUES LESS THAN('01-OCT-1999'),
PARTITION q4 VALUES LESS THAN(MAXVALUE)
);

NOTES

** Tables with Long columns cannot be partitioned.

** Until Oracle 8, you could not partition tables with large objects.


DBAsupport.com Home Page





internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Whitepapers and eBooks

Intel Whitepaper: Comparing Two- and Four-Socket Platforms for Server Virtualization
IBM Solutions Brief: Go Green With IBM System xTM And Intel
HP eBook: Simplifying SQL Server Management
IBM Contest: Are You the Next Superstar? Join the "Search for the XML Superstar" Contest to Find Out
Microsoft PDF: Top 10 Reasons to Move to Server Virtualization with Hyper-V
Microsoft PDF: Six Reasons Why Microsoft's Hyper-V Will Overtake Vmware
Microsoft Step-by-Step Guide: Hyper-V and Failover Clustering
Intel PDF: Quad-Core Impacts More Than the Data Center
Intel PDF: Virtualization Delivers Data Center Efficiency
Go Parallel Article: PDC 2008 in Review
Microsoft PDF: Top 11 Reasons to Upgrade to Windows Server 2008
Avaya Article: Communication-Enabled Mashups: Empowering Both Business Owners and IT
Intel Whitepaper: Building a Real-World Model to Assess Virtualization Platforms
  PDF: Intel Centrino Duo Processor Technology with Intel Core2 Duo Processor
Microsoft Article: Build and Run Virtual Machines with Hyper-V Server 2008
Go Parallel Article: Q&A with a TBB Junkie
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
IBM eBook: The Pros and Cons of Outsourcing
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
HP eBook: Guide to Storage Networking
MORE WHITEPAPERS, EBOOKS, AND ARTICLES