Warehouse Partition Mapping
Warehouse Partition Mapping tables are used for performance reason.
For example, a fact table in the data warehouse may have two columns: Sales and Years. If a report is run with Sales for the Year = 1999, the query engine will need to search through the entire table for all the years, including 1999, to return the data.
To improve efficiency, Partition Base Tables (PBT) can be created to have Sales for particular years. Assuming that there are 10 years worth of data in the database, 10 different partition base tables need to be created:
- PBT1: Sales for 1991 (Year=1991, Sales=$)
- PBT2: Sales for 1992 (Year=1992, Sales=$)
...
- PBT10: Sales for 2000
A Warehouse Partition Mapping Table (PMT) will then need to be created and will have:
| |
| |
| |
| |
| |
The above PMT is going to tell the engine which table to grab the data from for a particular year. This means that when the report is run for Sales for 1997, then the query engine will first go to the Partition Mapping Table and then find the correct PBT corresponding to the year 1997.
Metadata Partition Mapping
Metadata Partition Mapping Tables map the attribute elements to its corresponding PBT and performs the same function as the PMT.
To create a Metadata partitioning, follow the steps below:
By doing this, the equivalent of a PMT in the warehouse has been created, but in the metadata. In theory, both the warehouse and metadata partition mapping tables are accomplishing the same task.