SlideShare a Scribd company logo
1 of 24
Oracle Partitioning -- A Primer




                 1
                 1   MyOnlineITCourses.com
                       MyOnlineITCourses.com
Partitioning

Partitioning is the ability of the database to take very
 large tables or indexes and
    physically   break them into
       smaller

       manageable     pieces.




                                 2
                                 2   MyOnlineITCourses.com
                                       MyOnlineITCourses.com
Partitioned   VS   Non Partitioned Table




                       3
                       3   MyOnlineITCourses.com
                             MyOnlineITCourses.com
Partitions - Benefits

   ORDERS                 ORDERS                   ORDERS
                                                                   USA

                                                                  EUROPE
                          JAN FEB                  JAN FEB
   Large Table             Partition              Composite Partition
Difficult to Manage   Divide and Conquer          Better Performance
                       Easier to Manage         More flexibility to match
                                                   business needs
                      Improve Performance


         Transparent to applications

                                4
                                4           MyOnlineITCourses.com
                                              MyOnlineITCourses.com
Partitioning - Benefits
         • Queries will access only those relevant
           partitions
Faster


        • An entire partition can be exported
        • Exported partition can be deleted from
Cheaper   database


         • Partition Maintenance is simpler when
           compared to a large un-partitioned table
Flexible • Partition backup/restoration is easier




                             5
                             5     MyOnlineITCourses.com
                                     MyOnlineITCourses.com
When To Partition - Table

   Here are some suggestions for when to partition a table:

        Tables greater than 2 GB should always be considered as
         candidates for partitioning.

      Tables containing historical data, in which new data is
       added into the newest partition.
          A typical example is a historical table where only the
           current month's data is updatable and the other 11
           months are read only.
      When the contents of a table need to be distributed across
       different types of storage devices.



                                     6
                                     6      MyOnlineITCourses.com
                                              MyOnlineITCourses.com
Partition Strategies




           7
           7   MyOnlineITCourses.com
                 MyOnlineITCourses.com
Partition Type .. (Examples)




               8
               8   MyOnlineITCourses.com
                     MyOnlineITCourses.com
Range Partitioned Tables

           • Data distribution is based on range of values
           • Data distribution is continuous
Definition • Best performance when data distribution is even on
             the partition key.
           • Knowledge of data is critical before choosing this




           • Date as partitioning key
             Jan 2011, Feb 2011, Mar 2011 so on..
Example
           • Department code as partitioning key
             Values <= 30, Values > 30




                                     9
                                     9       MyOnlineITCourses.com
                                               MyOnlineITCourses.com
DDL Example …

CREATE TABLE DEPT (
DEPTNO NUMBER (2),
DEPT_NAME VARCHAR2 (30))
PARTITION BY RANGE (DEPTNO)
(
    PARTITION D1 VALUES LESS THAN (10) TABLESPACE DEPT1,
    PARTITION D2 VALUES LESS THAN (20) TABLESPACE DEPT2,
    PARTITION D1 VALUES LESS THAN (MAXVALUE) TABLESPACE
    DEPT3
)



                                 10
                                 10    MyOnlineITCourses.com
                                         MyOnlineITCourses.com
Range Partition (Multi column)
                     • Defined on two or more
                       columns of the table
Multi Column Range
      Partition




                     • Enhances Query performance
                       if searched on partition key
                     • Improves the Manageability of
   Advantages
                       partitions




                            11
                            11     MyOnlineITCourses.com
                                     MyOnlineITCourses.com
When to use Range Partition
                                       Very less time
    Very large                               for
   tables being                        administrative
  scanned on a                         operations like
range predicate                       backup on large
like Order-Date                            tables




                  Need to maintain
                  rolling window of
                         data




                               12
                               12     MyOnlineITCourses.com
                                        MyOnlineITCourses.com
Hash Partitioning


                Specify the                                 Oracle                     Specify


                              Always Define 2n Partitions
                number of                                   database                   storage for
Partition Key




                partitions                                  inserts                    the entire




                                                                             Storage
                                                            rows                       table and
                                                            based on                   the
                                                            hash value                 tablespace
                                                            of partition               for
                                                            key                        partitions



                                                                  13
                                                                  13       MyOnlineITCourses.com
                                                                             MyOnlineITCourses.com
Hash Partition – Example
Hash-partitioned table that splits the table into four parts based on
 the hash of the partition key, acct_no.


CREATE TABLE CUST_SALES_HASH (
ACCT_NO NUMBER (5),
CUST_NAME CHAR (30))
PARTITION BY HASH (ACCT_NO) PARTITIONS 4
 STORE IN (USERS1, USERS2, USERS3, USERS4);




                                     14
                                     14       MyOnlineITCourses.com
                                                MyOnlineITCourses.com
When to use Hash Partition

                  Improve
          Manageability/availability of
                Large tables


              Avoid data skew in
                  partitions



           Maximize I/0 throughput




                 15
                 15     MyOnlineITCourses.com
                          MyOnlineITCourses.com
List Partitioning
             •Segmenting data with a list of values

             •Flexible means of partitioning where data is better understood
Definition
             • Similar to Range Partitioning, but without any max value




          • CREATE TABLE DEPT_PART (DEPTNO NUMBER (2),DNAME VARCHAR2 (14),LOC
           VARCHAR2 (13))
           PARTITION BY LIST (DNAME)
           (PARTITION D1_EAST VALUES (‘NEW YORK’),
Example
           PARTITION   D2_WEST VALUES (‘SAN FRANCISCO’, ‘LOS ANGELES’),
           PARTITION D3_SOUTH VALUES (‘ATLANTA’,’DALLAS’,’HOUSTON’),
           PARTITION D4_NORTH VALUES (‘CHICAGO’,’DETROIT’));




                                              16
                                              16         MyOnlineITCourses.com
                                                           MyOnlineITCourses.com
Range ,List , Hash Partitions




               17
               17   MyOnlineITCourses.com
                      MyOnlineITCourses.com
Composite Partitioning


                A distinct value
                                     Composite
                pair for the two
    Data is                         Partitioning is
                  dimensions
  Partitioned                      complementary
                    uniquely
  along two                            to multi
                determines the
dimensions                          column range
                target partition
                                       partition




                         18
                         18    MyOnlineITCourses.com
                                 MyOnlineITCourses.com
Composite Partitioning Strategies

       New 11g Strategy            Use Case


List – Range              Geography –Time


Range - Range             Ship Date – Order Date


List - Hash               Geography – OrderID


List - List               Geography – Product




                          19
                          19    MyOnlineITCourses.com
                                  MyOnlineITCourses.com
Range – List Partitioning




             20
             20   MyOnlineITCourses.com
                    MyOnlineITCourses.com
Composite Partitioning
        Table SALES Range - Range
        RANGE(order_date)-RANGE(ship_date)

ship_date
                                                                     • All records with
 Jan                                                                  order_date in
 2006                                      ...                 ...    March 2006
                                                                      AND
 Feb
                                                                      ship_date in May
 2006                                      ...                 ...    2006

                       ...                            ...
 May
 May
 2006                                      ...                 ...
                       ...                            ...
        Jan 2006    Feb 2006    Mar 2006
                                Mar 2006         Jan 2007
                   order_date

                                                 21
                                                 21         MyOnlineITCourses.com
                                                              MyOnlineITCourses.com
Would like to learn more about
          oracle ???


              22
               22    MyOnlineITCourses.com
                    MyOnlineITCourses.com
www.MyOnlineITCourses.com
   We give quality online trainings by IT Professionals for

        Oracle SQL , PL/SQL

        Oracle DBA

        Oracle Performance Tuning

        Data Modelling with Erwin Tool

   To get more details contact us

            info@myonlineitcourses.com

             +91 991 2323 000

          www.Facebook.com/MyOnlineITCourses


                                  23
                                  23      MyOnlineITCourses.com
                                            MyOnlineITCourses.com
24
24   MyOnlineITCourses.com
       MyOnlineITCourses.com

More Related Content

What's hot

Oracle sql high performance tuning
Oracle sql high performance tuningOracle sql high performance tuning
Oracle sql high performance tuningGuy Harrison
 
Informix NoSQL & Hybrid SQL detailed deep dive
Informix NoSQL & Hybrid SQL detailed deep diveInformix NoSQL & Hybrid SQL detailed deep dive
Informix NoSQL & Hybrid SQL detailed deep diveKeshav Murthy
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basicsnitin anjankar
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsZohar Elkayam
 
An Introduction To Oracle Database
An Introduction To Oracle DatabaseAn Introduction To Oracle Database
An Introduction To Oracle DatabaseMeysam Javadi
 
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLThe InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLMorgan Tocker
 
Oracle statistics by example
Oracle statistics by exampleOracle statistics by example
Oracle statistics by exampleMauro Pagano
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsEnkitec
 
12. oracle database architecture
12. oracle database architecture12. oracle database architecture
12. oracle database architectureAmrit Kaur
 
Oracle Golden Gate Interview Questions
Oracle Golden Gate Interview QuestionsOracle Golden Gate Interview Questions
Oracle Golden Gate Interview QuestionsArun Sharma
 
MySQL: Indexing for Better Performance
MySQL: Indexing for Better PerformanceMySQL: Indexing for Better Performance
MySQL: Indexing for Better Performancejkeriaki
 
Hive partitioning best practices
Hive partitioning  best practicesHive partitioning  best practices
Hive partitioning best practicesNabeel Moidu
 
Tanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder
 

What's hot (20)

Partitioning
PartitioningPartitioning
Partitioning
 
Oracle sql high performance tuning
Oracle sql high performance tuningOracle sql high performance tuning
Oracle sql high performance tuning
 
Sql server basics
Sql server basicsSql server basics
Sql server basics
 
Informix NoSQL & Hybrid SQL detailed deep dive
Informix NoSQL & Hybrid SQL detailed deep diveInformix NoSQL & Hybrid SQL detailed deep dive
Informix NoSQL & Hybrid SQL detailed deep dive
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basics
 
ORACLE ARCHITECTURE
ORACLE ARCHITECTUREORACLE ARCHITECTURE
ORACLE ARCHITECTURE
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
 
An Introduction To Oracle Database
An Introduction To Oracle DatabaseAn Introduction To Oracle Database
An Introduction To Oracle Database
 
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLThe InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQL
 
Sql Server Basics
Sql Server BasicsSql Server Basics
Sql Server Basics
 
Oracle Data Guard
Oracle Data GuardOracle Data Guard
Oracle Data Guard
 
Oracle statistics by example
Oracle statistics by exampleOracle statistics by example
Oracle statistics by example
 
NoSQL databases
NoSQL databasesNoSQL databases
NoSQL databases
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
 
12. oracle database architecture
12. oracle database architecture12. oracle database architecture
12. oracle database architecture
 
Oracle Golden Gate Interview Questions
Oracle Golden Gate Interview QuestionsOracle Golden Gate Interview Questions
Oracle Golden Gate Interview Questions
 
Oracle archi ppt
Oracle archi pptOracle archi ppt
Oracle archi ppt
 
MySQL: Indexing for Better Performance
MySQL: Indexing for Better PerformanceMySQL: Indexing for Better Performance
MySQL: Indexing for Better Performance
 
Hive partitioning best practices
Hive partitioning  best practicesHive partitioning  best practices
Hive partitioning best practices
 
Tanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata Migrations
 

Similar to Oracle Partitioning - A Concise Guide to Partition Types and Strategies

8 i locally_mgr_tbsp
8 i locally_mgr_tbsp8 i locally_mgr_tbsp
8 i locally_mgr_tbspAnil Pandey
 
Twp partitioning-11gr2-2009-09-130569
Twp partitioning-11gr2-2009-09-130569Twp partitioning-11gr2-2009-09-130569
Twp partitioning-11gr2-2009-09-130569Naga Mallesh K
 
Advanced databases -client /server arch
Advanced databases -client /server archAdvanced databases -client /server arch
Advanced databases -client /server archAravindharamanan S
 
Partitioning kendralittle
Partitioning kendralittlePartitioning kendralittle
Partitioning kendralittlengupt28
 
Data Warehouse Best Practices
Data Warehouse Best PracticesData Warehouse Best Practices
Data Warehouse Best PracticesEduardo Castro
 
The High Performance DBA Optimizing Databases For High Performance
The High Performance DBA Optimizing Databases For High PerformanceThe High Performance DBA Optimizing Databases For High Performance
The High Performance DBA Optimizing Databases For High PerformanceEmbarcadero Technologies
 
Bc0058 data warehousing
Bc0058   data warehousingBc0058   data warehousing
Bc0058 data warehousingsmumbahelp
 
Getting to know oracle database objects iot, mviews, clusters and more…
Getting to know oracle database objects iot, mviews, clusters and more…Getting to know oracle database objects iot, mviews, clusters and more…
Getting to know oracle database objects iot, mviews, clusters and more…Aaron Shilo
 
database-stucture-and-space-managment.ppt
database-stucture-and-space-managment.pptdatabase-stucture-and-space-managment.ppt
database-stucture-and-space-managment.pptIftikhar70
 
database-stucture-and-space-managment.ppt
database-stucture-and-space-managment.pptdatabase-stucture-and-space-managment.ppt
database-stucture-and-space-managment.pptsubbu998029
 
Why To Use Data Partitioning?
Why To Use Data Partitioning?Why To Use Data Partitioning?
Why To Use Data Partitioning?raima sen
 
Best Practices and Performance Tuning of U-SQL in Azure Data Lake (SQL Konfer...
Best Practices and Performance Tuning of U-SQL in Azure Data Lake (SQL Konfer...Best Practices and Performance Tuning of U-SQL in Azure Data Lake (SQL Konfer...
Best Practices and Performance Tuning of U-SQL in Azure Data Lake (SQL Konfer...Michael Rys
 
PostgreSQL Table Partitioning / Sharding
PostgreSQL Table Partitioning / ShardingPostgreSQL Table Partitioning / Sharding
PostgreSQL Table Partitioning / ShardingAmir Reza Hashemi
 

Similar to Oracle Partitioning - A Concise Guide to Partition Types and Strategies (20)

Oracle: DW Design
Oracle: DW DesignOracle: DW Design
Oracle: DW Design
 
Oracle: Dw Design
Oracle: Dw DesignOracle: Dw Design
Oracle: Dw Design
 
8 i locally_mgr_tbsp
8 i locally_mgr_tbsp8 i locally_mgr_tbsp
8 i locally_mgr_tbsp
 
Partitioning 11g-whitepaper-159443
Partitioning 11g-whitepaper-159443Partitioning 11g-whitepaper-159443
Partitioning 11g-whitepaper-159443
 
Twp partitioning-11gr2-2009-09-130569
Twp partitioning-11gr2-2009-09-130569Twp partitioning-11gr2-2009-09-130569
Twp partitioning-11gr2-2009-09-130569
 
very large database
very large databasevery large database
very large database
 
Advancedrn
AdvancedrnAdvancedrn
Advancedrn
 
Advanced databases -client /server arch
Advanced databases -client /server archAdvanced databases -client /server arch
Advanced databases -client /server arch
 
Partitioning kendralittle
Partitioning kendralittlePartitioning kendralittle
Partitioning kendralittle
 
Data Warehouse Best Practices
Data Warehouse Best PracticesData Warehouse Best Practices
Data Warehouse Best Practices
 
The High Performance DBA Optimizing Databases For High Performance
The High Performance DBA Optimizing Databases For High PerformanceThe High Performance DBA Optimizing Databases For High Performance
The High Performance DBA Optimizing Databases For High Performance
 
Bc0058 data warehousing
Bc0058   data warehousingBc0058   data warehousing
Bc0058 data warehousing
 
Getting to know oracle database objects iot, mviews, clusters and more…
Getting to know oracle database objects iot, mviews, clusters and more…Getting to know oracle database objects iot, mviews, clusters and more…
Getting to know oracle database objects iot, mviews, clusters and more…
 
database-stucture-and-space-managment.ppt
database-stucture-and-space-managment.pptdatabase-stucture-and-space-managment.ppt
database-stucture-and-space-managment.ppt
 
database-stucture-and-space-managment.ppt
database-stucture-and-space-managment.pptdatabase-stucture-and-space-managment.ppt
database-stucture-and-space-managment.ppt
 
Why To Use Data Partitioning?
Why To Use Data Partitioning?Why To Use Data Partitioning?
Why To Use Data Partitioning?
 
DDBMS Paper with Solution
DDBMS Paper with SolutionDDBMS Paper with Solution
DDBMS Paper with Solution
 
Best Practices and Performance Tuning of U-SQL in Azure Data Lake (SQL Konfer...
Best Practices and Performance Tuning of U-SQL in Azure Data Lake (SQL Konfer...Best Practices and Performance Tuning of U-SQL in Azure Data Lake (SQL Konfer...
Best Practices and Performance Tuning of U-SQL in Azure Data Lake (SQL Konfer...
 
PostgreSQL Table Partitioning / Sharding
PostgreSQL Table Partitioning / ShardingPostgreSQL Table Partitioning / Sharding
PostgreSQL Table Partitioning / Sharding
 
Hive: Loading Data
Hive: Loading DataHive: Loading Data
Hive: Loading Data
 

Recently uploaded

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 

Recently uploaded (20)

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 

Oracle Partitioning - A Concise Guide to Partition Types and Strategies

  • 1. Oracle Partitioning -- A Primer 1 1 MyOnlineITCourses.com MyOnlineITCourses.com
  • 2. Partitioning Partitioning is the ability of the database to take very large tables or indexes and  physically break them into  smaller  manageable pieces. 2 2 MyOnlineITCourses.com MyOnlineITCourses.com
  • 3. Partitioned VS Non Partitioned Table 3 3 MyOnlineITCourses.com MyOnlineITCourses.com
  • 4. Partitions - Benefits ORDERS ORDERS ORDERS USA EUROPE JAN FEB JAN FEB Large Table Partition Composite Partition Difficult to Manage Divide and Conquer Better Performance Easier to Manage More flexibility to match business needs Improve Performance Transparent to applications 4 4 MyOnlineITCourses.com MyOnlineITCourses.com
  • 5. Partitioning - Benefits • Queries will access only those relevant partitions Faster • An entire partition can be exported • Exported partition can be deleted from Cheaper database • Partition Maintenance is simpler when compared to a large un-partitioned table Flexible • Partition backup/restoration is easier 5 5 MyOnlineITCourses.com MyOnlineITCourses.com
  • 6. When To Partition - Table  Here are some suggestions for when to partition a table:  Tables greater than 2 GB should always be considered as candidates for partitioning.  Tables containing historical data, in which new data is added into the newest partition.  A typical example is a historical table where only the current month's data is updatable and the other 11 months are read only.  When the contents of a table need to be distributed across different types of storage devices. 6 6 MyOnlineITCourses.com MyOnlineITCourses.com
  • 7. Partition Strategies 7 7 MyOnlineITCourses.com MyOnlineITCourses.com
  • 8. Partition Type .. (Examples) 8 8 MyOnlineITCourses.com MyOnlineITCourses.com
  • 9. Range Partitioned Tables • Data distribution is based on range of values • Data distribution is continuous Definition • Best performance when data distribution is even on the partition key. • Knowledge of data is critical before choosing this • Date as partitioning key Jan 2011, Feb 2011, Mar 2011 so on.. Example • Department code as partitioning key Values <= 30, Values > 30 9 9 MyOnlineITCourses.com MyOnlineITCourses.com
  • 10. DDL Example … CREATE TABLE DEPT ( DEPTNO NUMBER (2), DEPT_NAME VARCHAR2 (30)) PARTITION BY RANGE (DEPTNO) ( PARTITION D1 VALUES LESS THAN (10) TABLESPACE DEPT1, PARTITION D2 VALUES LESS THAN (20) TABLESPACE DEPT2, PARTITION D1 VALUES LESS THAN (MAXVALUE) TABLESPACE DEPT3 ) 10 10 MyOnlineITCourses.com MyOnlineITCourses.com
  • 11. Range Partition (Multi column) • Defined on two or more columns of the table Multi Column Range Partition • Enhances Query performance if searched on partition key • Improves the Manageability of Advantages partitions 11 11 MyOnlineITCourses.com MyOnlineITCourses.com
  • 12. When to use Range Partition Very less time Very large for tables being administrative scanned on a operations like range predicate backup on large like Order-Date tables Need to maintain rolling window of data 12 12 MyOnlineITCourses.com MyOnlineITCourses.com
  • 13. Hash Partitioning Specify the Oracle Specify Always Define 2n Partitions number of database storage for Partition Key partitions inserts the entire Storage rows table and based on the hash value tablespace of partition for key partitions 13 13 MyOnlineITCourses.com MyOnlineITCourses.com
  • 14. Hash Partition – Example Hash-partitioned table that splits the table into four parts based on the hash of the partition key, acct_no. CREATE TABLE CUST_SALES_HASH ( ACCT_NO NUMBER (5), CUST_NAME CHAR (30)) PARTITION BY HASH (ACCT_NO) PARTITIONS 4 STORE IN (USERS1, USERS2, USERS3, USERS4); 14 14 MyOnlineITCourses.com MyOnlineITCourses.com
  • 15. When to use Hash Partition Improve Manageability/availability of Large tables Avoid data skew in partitions Maximize I/0 throughput 15 15 MyOnlineITCourses.com MyOnlineITCourses.com
  • 16. List Partitioning •Segmenting data with a list of values •Flexible means of partitioning where data is better understood Definition • Similar to Range Partitioning, but without any max value • CREATE TABLE DEPT_PART (DEPTNO NUMBER (2),DNAME VARCHAR2 (14),LOC VARCHAR2 (13)) PARTITION BY LIST (DNAME) (PARTITION D1_EAST VALUES (‘NEW YORK’), Example PARTITION D2_WEST VALUES (‘SAN FRANCISCO’, ‘LOS ANGELES’), PARTITION D3_SOUTH VALUES (‘ATLANTA’,’DALLAS’,’HOUSTON’), PARTITION D4_NORTH VALUES (‘CHICAGO’,’DETROIT’)); 16 16 MyOnlineITCourses.com MyOnlineITCourses.com
  • 17. Range ,List , Hash Partitions 17 17 MyOnlineITCourses.com MyOnlineITCourses.com
  • 18. Composite Partitioning A distinct value Composite pair for the two Data is Partitioning is dimensions Partitioned complementary uniquely along two to multi determines the dimensions column range target partition partition 18 18 MyOnlineITCourses.com MyOnlineITCourses.com
  • 19. Composite Partitioning Strategies New 11g Strategy Use Case List – Range Geography –Time Range - Range Ship Date – Order Date List - Hash Geography – OrderID List - List Geography – Product 19 19 MyOnlineITCourses.com MyOnlineITCourses.com
  • 20. Range – List Partitioning 20 20 MyOnlineITCourses.com MyOnlineITCourses.com
  • 21. Composite Partitioning Table SALES Range - Range RANGE(order_date)-RANGE(ship_date) ship_date • All records with Jan order_date in 2006 ... ... March 2006 AND Feb ship_date in May 2006 ... ... 2006 ... ... May May 2006 ... ... ... ... Jan 2006 Feb 2006 Mar 2006 Mar 2006 Jan 2007 order_date 21 21 MyOnlineITCourses.com MyOnlineITCourses.com
  • 22. Would like to learn more about oracle ??? 22 22 MyOnlineITCourses.com MyOnlineITCourses.com
  • 23. www.MyOnlineITCourses.com  We give quality online trainings by IT Professionals for  Oracle SQL , PL/SQL  Oracle DBA  Oracle Performance Tuning  Data Modelling with Erwin Tool  To get more details contact us  info@myonlineitcourses.com  +91 991 2323 000  www.Facebook.com/MyOnlineITCourses 23 23 MyOnlineITCourses.com MyOnlineITCourses.com
  • 24. 24 24 MyOnlineITCourses.com MyOnlineITCourses.com