Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 10 Sep 2004 @ 10:51:14 GMT


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


Subj:   Re: Optimizing SQL
 
From:   Victor Sokovin

  Thanks for all the input on optimizing my sql. I changed the table to use a UPI and increased the speed from an hour to one second. Just thought everyone would want to know the outcome.  



I wonder which part of that second accounts for the journaling.

My feeling with this type of updates was always that the tables should be in one-to-one relationship (on row level) with each other for the statement to perform well. The syntax and stats should be clear enough for the optimizer to understand that.

I must admit that it also helps *me* to understand the logic of what I am about to do as well, so I have the sympathy for the optimizer in this case. UPI clearly helps the optimizer a lot to choose the right plan but it is not always the option to change NUPI to UPI, is it? Did you try to keep the NUPI and "clarify" the predicates, especially that OR condition? It would be good to have a solution for the NUPI as well, and your data set seems to be a good test case with such a range in performance. Let's hope you have the energy to play further with it and post the results.


Regards,

Victor



     
  <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