Quantcast
Channel: Teradata Developer Exchange - Blog activity for carrie's blog
Viewing all articles
Browse latest Browse all 1058

Statistics collection recommendations – Teradata 14.0 - comment by carrie

$
0
0

I'm not sure why your explain text doesn't give you estimated rows, but when I tried your SQL it worked for me.  Make sure you have collected stats on that column. 
EXPLAIN SELECT DISTINCT l_orderkey FROM myli;
 
  1) First, we lock a distinct CAB."pseudo table" for read on a
     RowHash to prevent global deadlock for CAB.myli.
  2) Next, we lock CAB.myli for read.
  3) We do an all-AMPs SUM step to aggregate from CAB.myli by way
     of an all-rows scan with no residual conditions
     , grouping by field1 ( CAB.myli.L_ORDERKEY).  Aggregate
     Intermediate Results are computed locally, then placed in Spool 1.
     The size of Spool 1 is estimated with high confidence to be
     2,000,000 rows (42,000,000 bytes).  The estimated time for this
     step is 1 minute and 11 seconds.
 
This table has 7,999,406 rows:   2,000,000  / 7,999,406 = 0.25
 
Thanks, -Carrie
 


Viewing all articles
Browse latest Browse all 1058


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>