Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 24 Jun 2011 @ 12:38:25 GMT


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


Subj:   Re: MLPPI on date field
 
From:   Dieter Noeth

Gutta_Ram wrote:

  For ex: If I am intrested in the sales of a particular product for a particular month in say 2008. IN this case, data can be retrieved by accessing a single partition. If I only have partitions at year(with out partitioning on months), then entire data of 2008 should be read.  


That's why you should partition by month.

Teradata partitions are not physical, but logical. All rows of a table are sorted by partition number first and then by RowHash within partition.

The partition number is based on the RANGE_N definition, e.g. if it's monthly partitions for 2010 and 2011 the data is stored in following order:

     partition    data
        01       2010-01
        02       2010-02
        03       2010-03
        04       2010-04
        05       2010-05
        06       2010-06
        07       2010-07
        08       2010-08
        09       2010-09
        10       2010-10
        11       2010-11
        12       2010-12
        13       2011-01
        14       2011-02
        15       2011-03
        16       2011-04
        17       2011-05
        18       2011-06
        19       2011-07
        20       2011-08
        21       2011-09
        22       2011-10
        23       2011-11
        24       2011-12

All the rows for one year are stored consecutive.


Dieter



     
  <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