473,473 Members | 1,563 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Range partition overlap

What is the syntax to overlap partitions? Lets assume I want a year
split amount 4 months (3 partitions for a year) and later adding an
additional set of partitions for every 6 months. Plus giving us the
option to detach old partitions.

For example:
CREATE TABLE orders(id INT, shipdate DATE, …)
PARTITION BY RANGE(shipdate)
(
PARTITION m12y05 STARTING MINVALUE,
PARTITION m4y06 STARTING '1/1/2006',
PARTITION m8y06 STARTING '5/1/2006',
PARTITION m12y06 STARTING '9/1/2006'
ENDING ‘12/31/2006'
)

========================

-- Detach old data
detach partition m12y05

============================

-- Later applying additional partitions

Alter table orders
Add Partition
(
Partition s6y06 starting '1/1/2006',
Partition s12y06 starting '7/1/2006' ending '12/31/2006'
)

Aug 18 '08 #1
3 3607
Justin,

I do not understand your question.
Partitions do not overlap. That's an oxymoron.

Your details request on the other hand seems to not imply that question
either. To the bets of my knowledge I don't think anything prevents you
from extending a range partitioned any which way you like....

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Aug 19 '08 #2

Hi Serge,

I think you answered my question. But, I do not understand your point
in extending partitions.

If partitions cannot overlap, that is fine. Is it possible to add a
partition?

For example, I have two years of data (2007 and 2008). The partition
is set-up by year. What is the default when 2009 comes to the table?
Is this the process of extending a partition?

In the process, I would like to detach 2007 data to slower disk
(different tablespace).
On Aug 19, 5:28*pm, Serge Rielau <srie...@ca.ibm.comwrote:
Justin,

I do not understand your question.
Partitions do not overlap. That's an oxymoron.

Your details request on the other hand seems to not imply that question
either. To the bets of my knowledge I don't think anything prevents you
from extending a range partitioned any which way you like....

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Aug 25 '08 #3
Justin wrote:
Hi Serge,

I think you answered my question. But, I do not understand your point
in extending partitions.

If partitions cannot overlap, that is fine. Is it possible to add a
partition?

For example, I have two years of data (2007 and 2008). The partition
is set-up by year. What is the default when 2009 comes to the table?
Is this the process of extending a partition?

In the process, I would like to detach 2007 data to slower disk
(different tablespace).
On Aug 19, 5:28 pm, Serge Rielau <srie...@ca.ibm.comwrote:
>Justin,

I do not understand your question.
Partitions do not overlap. That's an oxymoron.

Your details request on the other hand seems to not imply that question
either. To the bets of my knowledge I don't think anything prevents you
from extending a range partitioned any which way you like....
Yes, you can ATTACH new partitions. Take a look at the ALTER TABLE
statement.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Aug 26 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Abhijit | last post by:
I am working in a data warehousing environment which gets sourced from Oracle ERP (AR/GL/AP). The dimensional entities associated with incoming data are GL Code (e.g. 110), Department (e.g. 1050),...
3
by: dbarchitech | last post by:
hi, i'm building a query to find narrow ranges of zip codes within broader ranges in a table (for tax purposes). for example: LOW_ZIP HI_ZIP 23400 23499 need to find 23401 ...
1
by: Mark Dengler | last post by:
I am trying to write a C# backend program that will handle the database maintenance that I would otherwise have to do via Microsoft's Analysis Services front end GUI Wizards. Currently I am having...
5
by: sameer_deshpande | last post by:
Hi, I need to create a partition table but the column on which I need to create a partition may not have any logical ranges. So while creating or defining partition function I can not use any...
2
by: Dave | last post by:
In SQL 2000, I have paratitioned the data. I have a view that unions the tables to gether. Is there a way to update the records or add a record without having to write code to figure out which...
0
by: brunodamato | last post by:
I have 2 questions regarding DB2 9's Range Partitioning. 1. Do the Partition fields have to reside on the table being Partitioned? We have a Fact table we would like to Partition and the...
10
by: erikcw | last post by:
Hi, I have a list of numbers each with a +/- margin of error. I need to identify which ones overlab each other. For example: 55 +/- 3 20 +/- 2 17 +/- 4 60 +/- 3
2
by: tuniki77 | last post by:
Range by Partition sample code
3
by: Deano | last post by:
The short version; In short, given one date range (start and end dates) how can I find the period that overlaps with another date range? The long version; I have knocked up a little application...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.