Question

In: Computer Science

Give an example of a RANGE partition for a fact table of a data warehouse and...

Give an example of a RANGE partition for a fact table of a data warehouse and its major advantage.

Solutions

Expert Solution

Data warehouses often contain large tables and require techniques both for managing these large tables and for providing good query performance across these large tables.

Why Partition a Fact Table?

Large tables (i.e., tables with hundreds of millions of rows) can be difficult to manage because of their size and the amount of time it takes to do anything with them (e.g., rebuild an index). In a transactional database, the associative tables (i.e., those tables that involve the many to many—M:N—relationship) are often the tables with the most rows in the database. In dimensional modeling, a fact table is the equivalent of an associative table. Like an associative table in a transactional database, a fact table often has many more rows than its related dimensions, perhaps even as many as (# of rows in dimension 1) x (# of rows in dimension 2) … x (# of rows in dimension n) rows.

Range Partition is one of the technique in partitioning technique.

Range Partitioning (or table partitioning) allows you to create tables where the data is placed in multiple partitions according to data ranges that you specify. The range partitions can be placed into the same tablespaces or different tablespaces. The most common way to range partition is by date, but any data type or calculated columns can be used. An example is having rows with a date column and putting rows of different months in different partitions

Range partitioning maps data to partitions based on ranges of partition key values that you establish for each partition. It is the most common type of partitioning and is often used with dates. For example, you might want to partition sales data into monthly partitions.

Range partitioning maps rows to partitions based on ranges of column values. Range partitioning is defined by the partitioning specification for a table or index in PARTITION BY RANGE(column_list) and by the partitioning specifications for each individual partition in VALUES LESS THAN(value_list), where column_list is an ordered list of columns that determines the partition to which a row or an index entry belongs. These columns are called the partitioning columns. The values in the partitioning columns of a particular row constitute that row's partitioning key.

An ordered list of values for the columns in the column list is called a value_list. Each value must be either a literal or a TO_DATE or RPAD function with constant arguments. Only the VALUES LESS THAN clause is allowed. This clause specifies a non-inclusive upper bound for the partitions. All partitions, except the first, have an implicit low value specified by the VALUES LESS THAN literal on the previous partition. Any binary values of the partition key equal to or higher than this literal are added to the next higher partition. Highest partition being where MAXVALUE literal is defined. Keyword, MAXVALUE, represents a virtual infinite value that sorts higher than any other value for the data type, including the null value.

The following statement creates a table sales_range that is range partitioned on the sales_date field:

CREATE TABLE sales_range 
(salesman_id  NUMBER(5), 
salesman_name VARCHAR2(30), 
sales_amount  NUMBER(10), 
sales_date    DATE)
COMPRESS
PARTITION BY RANGE(sales_date)
(PARTITION sales_jan2000 VALUES LESS THAN(TO_DATE('02/01/2000','DD/MM/YYYY')),
 PARTITION sales_feb2000 VALUES LESS THAN(TO_DATE('03/01/2000','DD/MM/YYYY')),
 PARTITION sales_mar2000 VALUES LESS THAN(TO_DATE('04/01/2000','DD/MM/YYYY')),
 PARTITION sales_apr2000 VALUES LESS THAN(TO_DATE('05/01/2000','DD/MM/YYYY')));

The Advantages of Range partitioning:

  • Improved Query Performance
  • Allows for optimized roll-in / roll-out processing of Ranges
  • Optimize the management of very large tables
  • Greater Index Placement Flexibility
  • Partition for Avalibility

Related Solutions

Using the data in the following? table, and the fact that the correlation of A and...
Using the data in the following? table, and the fact that the correlation of A and B is 0.02?, calculate the volatility? (standard deviation) of a portfolio that is 80% invested in stock A and 20% invested in stock B.              Stock A   Stock B 2005       -12           16 2006        13           20 2007          8           7 2008         -1         -1 2009          5        -12 2010          6          15 The standard deviation of the portfolio is?
Using the data in the following​ table, and the fact that the correlation of A and...
Using the data in the following​ table, and the fact that the correlation of A and B is 0.32​, calculate the volatility​ (standard deviation) of a portfolio that is 80% invested in stock A and 20% invested in stock B.    Stock A   Stock B 2005   -4   28 2006   19   20 2007   3   8 2008   -1   -8 2009   5   -9 2010   13   30
Using the data in the following​ table, and the fact that the correlation of A and...
Using the data in the following​ table, and the fact that the correlation of A and B is 0.39​, calculate the volatility​ (standard deviation) of a portfolio that is 70% invested in stock A and 30% invested in stock B. Realized Returns Year Stock A Stock B 2008 −8​% 27​% 2009 17​% 28​% 2010 1​% 11​% 2011 −3​% −2​% 2012 1​% −3​% 2013 8​% 26​% The standard deviation of the portfolio is _%?
can you give me any example by using this methods : 1) Collecting data in table...
can you give me any example by using this methods : 1) Collecting data in table 2) Histogram chart 3) Pareto chart You can use software and i want sketch for three methods.
The fact that BE/A is greatest for A near 60 implies that the range of the...
The fact that BE/A is greatest for A near 60 implies that the range of the nuclear force is about the diameter of such nuclides. (a) Calculate the diameter of an A = 60 nucleus. ________ fm (b) Calculate BE/A for 56Fe and 102Ru. The first is one of the most tightly bound nuclides, while the second is larger and less tightly bound. 56Fe ________ MeV 102Ru ________ MeV
Take advantage of the fact that the range of the integers in the list is fixed...
Take advantage of the fact that the range of the integers in the list is fixed (0 to m, where m is the largest ID you can find in the linked list). Use a boolean array seen of length m+1 to indicate if elements in the array have been seen before. Then determine if there are duplicates by performing a single pass through the unsorted list. Hint: while traversing the list, seen[item] = True if integer item has been seen...
I, Answer the question following the fact pattern: A] Warehouse manager knows that the cold season...
I, Answer the question following the fact pattern: A] Warehouse manager knows that the cold season has passed. He still has Winter items that he would like to sell. He offers to retailers: - coats @75/ea; 40/15 net 30; Retailer purchases 10 coats on June 30th -gloves @30/pair; 25/15; Retailer purchases 50 pairs of gloves on July 1st - boots @140/pair 35/5; Retailer purchases 27 pairs of boots on July 5th *** additional 7 and 1/2% for out of season...
Construct a pivot table (frequency table) of the data from Manufacturing Example xlsx What is the...
Construct a pivot table (frequency table) of the data from Manufacturing Example xlsx What is the probability that a randomly selected piece is out of spec? Round to 2 decimals (ie, 0.04) Inspection Data L1 1.062 1.066 1.066 1.060 1.066 1.066 1.060 1.059 1.067 1.064 1.066 1.063 1.06 1.06 1.067 1.065 1.059 1.066 1.07 1.063 1.062 1.071 1.061 1.061 1.071 1.066 1.063 1.070 1.069 1.059 1.059 1.067 1.063 1.062 1.07 1.061 1.070 1.069 1.071
The table below give data on an exposure of interest in a population and the numbers...
The table below give data on an exposure of interest in a population and the numbers of people with the disease/outcomes. Answer the following questions on PAR for this population (4.5 points). Exposure Total Pop. Outcome Present Present 50,000 10,000 Absent 250,000 2,000 What is the prevalence of exposure? What is the prevalence of non-exposure? What is the risk of the disease or outcome in the exposed? What is the risk of the disease or outcome in the unexposed? What...
Give an example of another scenario that you could create a payoff table for, what are...
Give an example of another scenario that you could create a payoff table for, what are the decision alternatives, states of nature, and payoffs? Why do you think these methods are called “under ignorance”?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT