Presentation is loading. Please wait.

Presentation is loading. Please wait.

Partition Architecture Yeon JongHeum 2008. 07. 18.

Similar presentations


Presentation on theme: "Partition Architecture Yeon JongHeum 2008. 07. 18."— Presentation transcript:

1 Partition Architecture Yeon JongHeum 2008. 07. 18.

2 Copyright  2008 by CEBT Partition Table  Purpose Efficient management of huge amount table Guarantee performance  Concept Separate a table to into several small table with condition  Examples of usage History Table Management Disk IO distribution 2

3 Copyright  2008 by CEBT Single Table vs. Partition Table  Difficulty in management of large amount history table Spend extra time in Rollback Segment and Redo Log Inefficiency of Index Example – DELETE FROM history WHERE date LIKE ‘200310%’ vs. – ALTER TABLE history drop partition 200310 3

4 Copyright  2008 by CEBT Single Table vs. Partition Table  Slow down the performance of 1 row access Size table grows => Brand block level grows in B-TREE Index => Depth increase  Slow in monthly report Index Scan => 1/6 Random Access Table Full Scan 4 vs.

5 Copyright  2008 by CEBT Partition Table Type  Range Partition  Hash Partition  List Partition  Composite Partition 5

6 Copyright  2008 by CEBT Range Partition  Components Partition Key Column Range Condition Table Partition Segment Partition Table 6 History Table 200404 Partition 200402 Partition 200403 Partition Partition Table Table Partition Segment Partition Key Column(Date) Value Less Than ‘20040232’ Value Less Than ‘20040332’ Value Less Than ‘20040332’ Range Condition Maxvalue

7 Copyright  2008 by CEBT Range Partition  Point of consideration Parallel processing Disk IO distribution Select range partition key column – Primary column of access path – Possible to separate with range – History management column 7 1000 ~ 20002008-04 2000 ~ 3000 3000 ~ 4000 2008-05 2008-06 vs.

8 Copyright  2008 by CEBT Hash Table  Make partition with hash value result which is applied hash function in Partition Key Column  Oracle doesn’t open hash function  User cannot know where rows is stored  Point of consideration Verify that Range Partition can be applied Verify Hash Partition Key Column distribution  Advantage Disk IO distribution Good performance in accessing 1 row Reduce competition in index left leaf block Profitable in parallel processing 8

9 Copyright  2008 by CEBT Hash Table 9

10 Copyright  2008 by CEBT List Partition  Make use when user can know every value in column which has low cardinality  Select the column as Partition Key and make partition with equals values rows  Not range. Equal(=) 10

11 Copyright  2008 by CEBT List Partition  Disadvantage Fixed Partition Key column value is possible Partition available with only 1 column  Advantage Make partition with Equal(=) value, Not Between value Disk IO distribution Benefit in history table management Parallel Processing available Solution of slow down in accessing 1 row 11

12 Copyright  2008 by CEBT Composite Partition  Concept Combination of two partition e.g.) Range Partition + Hash Partition  Feature Difficulty in management because large amount of partition will be made Have advantages of two partitions Good performance of accessing 1 row because of reducing index depth Probability of whole disk access increases via disk IO distribution of hash partition Optimize parallel processing 12

13 Copyright  2008 by CEBT Composite Partition 13

14 Copyright  2008 by CEBT Partition Index  Global Index & Local Index  Prefix Index & Nonprefix Index 14

15 Copyright  2008 by CEBT Partition Index  Global Index Index of the base table Require index rebuild if partition is modified 15

16 Copyright  2008 by CEBT Partition Index  Local Index Index of the each partition table Good for history table Possible to concurrent work with each partition and index 16

17 Copyright  2008 by CEBT Partition Index  Prefix Index First index column == Index partition key CREATE INDEX history_idx ON history(YYYYMMDD, SNN) GLOBAL PARTITON BY RANGE (YYYYMMDD) … Good performance on query  Nonprefix Index First index column != Index partition key CREATE INDEX history_index on history(SSN) LOCAL Bad performance on DML and query Good performance with query with index column + nonprefix index – SELECT num, item FROM history where num=‘133’ and YYYYMMDD like ‘200402%’ 17

18 Copyright  2008 by CEBT Which index?  Global Prefix Index Problem with management – Need to rebuild index Good performance  Global Nonprefix Index Not exist Change available to Local Prefix  Local Prefix Index Good management Good performance  Local Nonperfix Index Good management Bad performance Use when access path is not table partition key 18

19 Copyright  2008 by CEBT Which index? 19 Partition Index Access with table partition key? Local Prefix Index Global Index Local Nonprefix Index Managing history? Possible tuning with Table Partition Key? Yes No


Download ppt "Partition Architecture Yeon JongHeum 2008. 07. 18."

Similar presentations


Ads by Google