Tags for joins
LEFT JOINs and order of positions of fields in ON condition
Normally when I build a query with LEFT JOINs I have a previously mentioned table on the left side of the equal the table in the LEFT JOIN on the right side of it. In analyzing queries that a 3rd party app is executing I see something like the following: SELECT * FROM S1.TABLE_A ID LEFT JOIN S1.TABLE_B B on B.ID=A.ID   
joins join
Need suggestions to optimize the complex query (below) involving several Joins and Aggregation..
performance tuning aggregation joins union large table
Joins involving Partitioned PIs
Hello Guru's,   I have few queries where in joins one of the col is Partitioned PI and other side of the join is non Partitioned PI. I understand this is not good for query performance point of view. What is the impact of that? How to identify such issue from explain Plan?
Partitioned PI joins
I Have totals by date, - want to get total "to date" for each date
Hello -  I'm hoping someone can give a little guidance  on how to create a table that includes a "sum to date" - I believe there must be a simple way to do this but I have been unable to find a thread with this topic.   I am starting with a table(totals_by_date) with two columns - _date,total.   ( like this):
sum to date aggregation sum joins total to date
Nested joins in Teradata
Can anybody please explain how nested joins work in Teradata???   What I know about the other joining strategies is that   Merge Join : PI-PI join is on the same AMP. Hence no redistribution                      PI -Non PI join: Non PI column redistributed temporarily in spool.
Solving Business Problems with SQL
The presentation is to acquaint business users with Structured Query Language (SQL) and some interesting techniques to access their data with examples for using CASE; Subqueries and Correlated Subqueries; Types of SQL joins and how they are implemented on Teradata; facts about NULLs; Derived Table usage and other interesting optimizer information.
sql joins dml case Nulls
Partition Elimination Puzzel
Background: We have a history table which is partitioned on loadDate. This table also has another column called ProcessYearMonthNumber which is the year and month number of the loadDate. I know this can be derived on the fly but for some reason we have this as a separate column with values populated by ETL.
joins ppi partition elimination history tables full table scans
Temporal Macro / Dynamic SQL in a View
Hi, I have the following tables EMPLOYEE& DEPT. I am writing the following query :   validtime as of date '2001-01-01' select * from SANDBOX.TEMPORAL_EMPLOYEE AS EMP join SANDBOX.TEMPORAL_DEPT as dept on emp.dept_id=dept.dept_id;    
temporal sql views joins macro
Joining Sequence
hi All I m using V12, Does the sequence of joins(outer) written in the query ,have any impact on the performance of the query. I had a query with around 60 joins ,with most of them left outer joins. Does changing the sequence of these left outer joins can improve the performance.
Strange behaviour joining to concatenated variable
I've had some problems with joining to a concatenated variable and although I've fixed the problem I'd like to understand what happened here. As background, in a transaction table we have the first digit of the account number was dropped for a couple of days and so we have a number of records where the account number needs a single digit added to the front. We basically wanted to do a really simple query to find out how many transactions have been made on an account. However, when a join on the reconstructed account number didn't work. The abstraction of the code is below:
joins concatenate