Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 14 Dec 2005 @ 15:32:08 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   Multi-type Partitioning
 
From:   David Clough

I can't find any reference to example of Partitioning tables by more than one type of criteria, so has anyone done it ?

Currently, I have a table Partitioned in this way :

     CREATE MULTISET TABLE CONKPI_NEW
          (
           CON_SRKY_ID INTEGER NOT NULL,
           CON_TYPE_CD BYTEINT NOT NULL,
           DTE_YRWK_NR INTEGER NOT NULL,
           CON_DELIVERY_DT DATE FORMAT 'yyyy-mm-dd',
           CON_DELIVERY_TM TIME(0),
           CON_POD_DT DATE FORMAT 'yyyy-mm-dd',
           CON_POD_TM TIME(0),
           CON_INCMPL_IN ...
        ....
        ..... )
     PRIMARY INDEX CONKPI_NUPI ( CON_SRKY_ID )
     PARTITION BY   RANGE_N(DTE_YRWK_NR  BETWEEN
        200201  AND 200253  EACH 1 ,
        200301  AND 200353  EACH 1 ,
        200401  AND 200453  EACH 1 ,
        200501  AND 200553  EACH 1 ,
        200601  AND 200652  EACH 1 ,
        200701  AND 200752  EACH 1);

, which is fine.

But now I want to further split it down into the values of CON_TYPE_CD (values 1,2,3) as well as the YearWeek.

Can I do this, or would I be mixing my partitioning types ?

Basically, each one of the Con Types would have entries in each Week of the Year, and queries would want to specify a particular week (as they do now) but also a particular value of 1,2 or 3 for Con Type.

Any partitioning ideas ?


_______________________
Dave Clough
Database Designer
Express ICS

www.tnt.com



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023