Various Table Partitioning in SAP HANA
-
Upload
debajit-banerjee -
Category
Technology
-
view
1.075 -
download
42
description
Transcript of Various Table Partitioning in SAP HANA
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 1
For simplicity, here I have discussed only Single-Level Partitioning with all the three partitioning specifications - Hash, Range and Round-robin. Also I have shown the steps for re-distribution of all the partitions to different hosts in a distributed SAP HANA database.
Partitioning a Non-Partitioned Table ………………………………………………………………………………………… 2
Round-Robin Partitioning ……………………………………………………………………………………………………………. 2
Hash Partitioning ……………………………………………………………………………………………….. 8 Range Partitioning ……………………………………………………………………………………………… 14
Changing a Partitioned Table into a Non-Partitioned Table …………………………. 18
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 2
Partitioning a Non-Partitioned Table
Round-Robin Partitioning – Table
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 3
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 4
Before doing a redistribution operation, it is always better to save the current configuration.
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 5
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 6
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 7
Now, Round-robin Partitioning has been completed and Partitioned Tables also distributed between two hosts.
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 8
HASH Partitioning - Table
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 9
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 10
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 11
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 12
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 13
Now, Hash Partitioning of AUSP table has been completed and Partitioned Tables also distributed between 4 hosts.
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 14
Range Partitioning - Table
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 15
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 16
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 17
Now, Range Partitioning of KONV table has been completed. From the results, we can easily understand that distribution of records was not proper between all the partitions. What to do then?
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 18
Changing a Partitioned Table into a Non-Partitioned Table As per the above Range partition results, it clearly depicts that distribution was not proper as Range selections were wrong. So, to rectify the same we have to follow the below process –
1) Changing Partitioned Table into a Non-Partitioned Table 2) Then Repartition the table with proper range selection
Select the Merge Partitions option.
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 19
Once again, trying to do Range Partition now for better record distributions.
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 20
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 21
Various Table Partitioning in SAP HANA Prepared by Debajit Banerjee
http://debajitb.wix.com/debajitbanerjee | http://debajitb.wix.com/debajitbanerjee/apps/blog 22
===== End of Document ======