473,698 Members | 2,943 Online
Bytes | Software Development & Data Engineering Community
+ 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 3633
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
3349
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), Core account (e.g. 301) , sub account (e.g 9). The incoming data needs to be mapped to key performance indicators (KPI) e.g. 'All Other Revenue', 'OEM Revenue' etc. The mapping is driven by GL, Dept, Core account , sub-account ranges. Example - ...
3
10575
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 23402
1
5684
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 a problem with recreating the SliceValue. The value is a time dimension and should equate to ... and instead it is these same values, but instead of being seperated by periods it has some sort of non-displayable character (maybe a newline)...
5
5947
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 range. like CREATE PARTITION FUNCTION my_part_func (NUMERIC(7)) AS RANGE LEFT FOR VALUES (1,100,1000);
2
1738
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 paratition the record needs to go in.
0
1684
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 Week identifier resides on the table. This identifier's parent Dimension table has a month value. In order to Partition the Fact table by month, somehow the Dimension table would need to be referenced. 2. The Fact table mentioned in the above...
10
2260
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
1439
by: tuniki77 | last post by:
Range by Partition sample code
3
2332
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 that helps my friend monitor employee absences. You can enter the start and end dates of an absence. For reports the user specifies start and end dates which produces a list of people with absences
0
8683
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8610
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9031
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8902
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8873
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7740
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6528
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4372
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.