![]()  |  
 
 
 | 
Archives of the TeradataForumMessage Posted: Sat, 03 Jan 2009 @ 20:35:17 GMT
 
 Shijo: The only limit for processing a subquery should be spool space. If you are not running out of spool than it should not be the case of too many values. Are there several duplicate values for column1 in tablename2? If so you could try the following: 
select count (*) from tablename1
where column1
         IN (select column1 from tablename2
             where condition group by column1
            )
This will eliminate any duplicate values and therefore reduce the spool utilization and the number of values being returned. Regards, Michael Larkins 
  | ||||||||||||||||||||||||||||||||||||||||||||||||
|   | ||||||||||||||||||||||||||||||||||||||||||||||||
 
  | ||||||||||||||||||||||||||||||||||||||||||||||||
|  
 | ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||