Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 11 Feb 2004 @ 10:59:12 GMT


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


Subj:   Re: Spool lookup
 
From:   Anomy Anom

<-- Anonymously Posted: Wednesday, February 11, 2004 05:47 -->

Use the HashAmp queries to see the distribution at any given point in the query and run with the relevant WHERE clause distributed on whatever key redistribution is on in your EXPLAIN at that point.

SELECT
HASHAMP(HASHBUCKET(HASHROW(col1, col2, etc))),
COUNT(*) FROM
db.tablename (joining tables as necessary)
where whatever = whatever
and somethingelse = somethingelse
etc
GROUP BY 1
ORDER BY 2 DESC ;

If you want the actual data then just run that portion of the query as determined from the EXPLAIN at that point.



     
  <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: 27 Dec 2016