Multi column partitioning is possible ??

Data Modeling
Enthusiast

Multi column partitioning is possible ??

Dear Experts,

 

Need a help !!

 

I am in a situation where i need to create a mnulti column partition. I am not sure if it can be done.

There are couple of columns in the huge table which would be used in the queries frequently to extract the information.

For example: MonthOfYear (ranges from 1 - 12 and suppose two values '0' and '99'(norange/incorrectvalues)) and Year(2000-2999)

Now, the queries will use these two columns very frequently to extract the data from MonthofYear combining it with the Year. Single column will never be used in the query.

I am using TD 15.00. Let me know if multi column partition can be used and how ? Example fo the syntax would be really helpful :) I know I might have missed similar discussion earlier !!

 

 

Tags (1)
2 REPLIES
rjg
Supporter

Re: Multi column partitioning is possible ??

Possible? Yes

 

Syntax:

SyntaxEditor Code Snippet

PARTITION BY (RANGE_N(col1 BETWEEN DATE '1999-01-01'
                                      AND     DATE '9999-12-31'
                                      EACH INTERVAL '1' Day,No Range,Unknown),
                   RANGE_N(col2   BETWEEN 1
                                      AND    100
                                      EACH 1,No Range,Unknown))
Enthusiast

Re: Multi column partitioning is possible ??

Thanks.