Hi All,
I'm trying to set up a table with a sub-partitioned on month of year,
but the date functions don't appear to be allowed within the syntax...
modify eyeballz to btree on captured_date
with partition=((
range on captured_date
partition eyeballz_pre_2008 values < '1/1/2008',
partition eyeballz_2008 values < '1/1/2009',
partition eyeballz_post_2008 values >= '1/1/2009')
subpartition (list on date_part('month', captured_date)
partition eyeballz_sp_jan values (1),
partition eyeballz_sp_feb values (2),
partition eyeballz_sp_mar values (3),
partition eyeballz_sp_apr values (4),
partition eyeballz_sp_may values (5),
partition eyeballz_sp_jun values (6),
partition eyeballz_sp_jul values (7),
partition eyeballz_sp_aug values (8),
partition eyeballz_sp_sep values (9),
partition eyeballz_sp_oct values (10),
partition eyeballz_sp_nov values (11),
partition eyeballz_sp_dec values (12),
partition eyeballz_sp_nul values DEFAULT
)
);
In this tables case, we expect a *LOT* of data to be written into the
table with little retrieval. I'm trying to make a situation where only
one sub-partition would be active in any month of any year so that I can
focus maintenance on that partition only and ignore the rest.
Any ideas?
Martin Bowes
DougI - 02 Jul 2008 14:03 GMT
> Hi All,
>
[quoted text clipped - 53 lines]
>
> Martin Bowes
If this is 2006r2 or later, you can use the date literal format:
date'2008-07-02'. It is an official constant and no functions are
involved.