Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Tue, 27 Apr 2004 @ 07:03:38 GMT

  <Prev Next>   <<First <Prev

Subj:   Re: Redistribution of SPOOL
From:   Anomy Anom

<-- Anonymously Posted: Tuesday, April 27, 2004 00:45 -->


The explain step you supplied in isolation will not tell you what you need to know.

By the look of your step explain text you have picked this up from a PMON or TDManager running SQL explain - these explains typically are missing some significant detail - you can get a much better explain if you copy the query to a queryman session and explain it from there.

The explain text (from queryman etc.) should tell you what field(s) the join is using (which since this is a merge join tells you what the PI of the spools being joined are). If you look at subsequent steps you should be able to work out what the PI of the spool created in this step will be using the same method.

As to the size, the regular explain text will give you an estimate, but in reality the accuracy of the estimate can vary widely, so it is very difficult to estimate the ultimate size of a spool without deep understanding of the data involved and what the optimiser is up to.

Ways in which you might eliminate this distribution pretty much involve either query rewrites, collection of statistics, or table redesign. I'd suggest investigating your collection of statistics as a first step as it is generally a bad idea trying to fool/force the optimiser into doing something without giving it a good chance to get it right on its own first.

In short it is impossible to properly address your question without significantly more detail.


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