Archives of the TeradataForum
Message Posted: Fri, 31 Jan 2003 @ 10:53:08 GMT
How many rows in "table2" and how many unique values are there for column table2.rid?
What are the primary indexes of "table1" and "table2"?
What does the join plan for each query look like?
The second query will be reducing the "table2" values in column rid to a unique set, if this takes this table from lots of rows to a very few unique values then you've only got a very few rows being joined to "table1". The first query will quite possibly move one or both tables followed by a merge join between the two, with many many comparisons.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|