Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Fri, 19 Sep 2003 @ 21:17:27 GMT

  <Prev Next>   <<First <Prev

Subj:   Re: SQL Problem and CASE WHEN statements
From:   Watzke, Michael


It seems unlikely that the case statements in and of themselves are the problem. More likely there are execution plan differences between the select count(*) and the actual query. This is likely because of the difference in size of the spool files as a result of the number of projected columns in the actual query vs. the select count(*). This can for example influence join ordering or join geography.

As to why the actual query suddenly started running longer my first advise would-be to review the actual queries explain and look for issues. Example issue are duplicating large tables or redistributing a large table on a non unique value.

If you have a old explain to compare with that would be better yet.


  <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