You can do one more test. Remove the group by and see how many rows are returned after the 2 tables join. That will give you good idea how much space is needed
select shows 5075 rows wihtout group by. It took 30 minutes to run the select statement.
Originally posted by tamilselvan You can do one more test. Remove the group by and see how many rows are returned after the 2 tables join. That will give you good idea how much space is needed.
I don't think so -- the space requirement is related more to the size of the output from the grouping than it is to the number of ungrouped rows.
For example,
Code:
Select Sum(my_num)
From table_with_million_rows
... is going to require very little sort space, right?
Slimdave,
It is not the group by clause causing the problem b/c the result set after joining 2 big tables is small. MERGE JOIN operation is causing real problem of filling out the temp space. I am trying to eliminate MERGE JOIN by adding an INDEX.
Originally posted by tamilselvan Slimdave,
It is not the group by clause causing the problem b/c the result set after joining 2 big tables is small. MERGE JOIN operation is causing real problem of filling out the temp space. I am trying to eliminate MERGE JOIN by adding an INDEX.
Tamil
OK I see ... well I'd think that a hash join would be worth trying also.
Bookmarks