Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 19 Mar 2008 @ 20:26:55 GMT


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


Subj:   Re: Creating a table with a 0 skew factor
 
From:   Anomy Anom

<-- Anonymously Posted: Wed, 19 Mar 2008 12:44 -->

Another possible explanation: Some AMPs have more hash buckets than others. This is normal. For most systems the number of AMPs does not evenly divide the number of buckets in the hash map. The effect is small as long as the number of AMPs is much less than the number of buckets. But it means "zero skew" at the AMP level is a theoretical ideal that is unlikely to be achieved.

     SELECT HASHAMP(BucketNbr) AS AMPNbr, COUNT(*) AS NbrBucketsPerAMP,
     SUM(NbrRows) AS NbrRowsPerAMP, MIN(NbrRows) AS MinRowsPerBucket,
     MAX(NbrRows) as MaxRowsPerBucket
       FROM (SELECT HASHBUCKET(HASHROW(seq_no)) AS BucketNbr, COUNT(*) AS
     NbrRows FROM CAPACITY_ON_DEMAND.COD_1 GROUP BY 1) DT1
       GROUP BY 1 ORDER BY 1;

By the way, your posted DDL defines seq_no as FLOAT. That's usually not a good idea for other reasons, but it's unlikely to make much difference as far as the answer to your question.



     
  <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