0 - 10 of 10 tags for query optimization

Hello fellow Teradata-ers,

I need to process data based on the following query.


    FROM (

    SELECT TOP 1000000 id

        FROM table1

        WHERE idBETWEEN 1100101 AND 1100228

            AND  id> 23434

        ORDER BY id) AS t;



output : 445544

Consider the following situation: 
Table Alpha has the following columns:
Primary Index (Col1, Col2, Col3, Col4)
Table Beta has the following columns:
Primary Index (Col1, Col2, Col3)

Hi All,
I have two versions(One is old which is being rewritten using some new standards) of code both claiming to accomplish the same thing; with the subset of data we tested both seems to give the same results. If you guys see any issues in the new code, pelase let me know.
Old Code:

Can anyone provide me a logic to apply transpose on rows to columns without the use of any other files(like .sqls or Bteq)? I need to select this result from different tables and insert it into a table. I have used left outer joins but is there any other easy way to do this?

Hi All,
We are doing migration from Netezza to Teradata and similar changes are done in Business Objects to accomodate Reporting change in database.

Hi folks,

I have a problem and I would like if you can advise if anything can be done about that.


I have quite huge table (~2 billion records) which is partitioned by date. In order to query effectively my SQLs need to use these partitions to retrieve data in reasonable time.

PFB the table(work_table) created and the data in it:

p_cust p_r_cust p_date
1 2 07/07/2011
2 3 07/09/2011
3 4 07/11/2011

update a
from work_table a ,work_table b
set p_r_cust = b.p_r_cust
where b.p_date >= a.p_date
and b.p_cust = a.p_r_cust
and b.p_r_cust <> a. p_r_cust;

Result table after the first run of the above mentioned query:

p_cust p_r_cust p_date
1 3 07/07/2011
2 4 07/09/2011
3 4 07/11/2011

Result table after the second run of the above mentioned query:

Hi All,
I am doin an innerjoin on two tables with a condition say
A.col1=B.col1, when I do explain on the query it shows that a product join is been made between the tables though there is a join condition.Can any body explain me why it's happening and how to avoid the product join.

Thanks in Advance,