Archives of the TeradataForum
Message Posted: Thu, 16 Jul 2015 @ 17:40:23 GMT
Hello Arnie - Thanks for all the pointers.
I had collected the stats for the DISTINCT operator ( COL1,COL2,START_DATE, END_DATE,PLCFLAG). It came as one of the HIGH CONF stats while doing the DIAGNOSTICS HELPSTATS for session. However still got only Low confidence in the explain. As you mentioned, it is the low cardinality that is causing the lengthy join. Unfortunately that's how the data is in the table.
What I did is - I changed the PI for TABLE1 to be same as PI for table 2 and used MERGE UPDATE(That's the only way out). The execution time came down to 27 minutes from the original 90 minutes.
There was a huge win on the IO and CPU too.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 24 Jul 2020|