Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 06:26 AM
Susanne Bandi
Guest
 
Posts: n/a
Default Union in Views: No Branch Elimination because predicate with NonCor-Subselect ?

Hello

I've experienced that DB2 unfortunately does not eliminate subselects
of a UnionAll-View if the predicate's content is not hardcoded but
derived from a base-table with a noncorrelated Subselect.

Any plans to enhance this for the future? Any workaround suggestions?

Thanks in advance
Susanne

Sample:
* T1 contains all records for branch X, T2 for branch Y, and T3 for branch Z
* Create View ALLRECS as
select * from T1 where branch = 'X'
union all
select * from T2 where branch = 'Y'...
* NO Check Constraints
* SELECT...
FROM ALLRECS
WHERE branch in (Select branch
from BASETAB
where owner = 'SUE')
  #2  
Old November 12th, 2005, 06:26 AM
Serge Rielau
Guest
 
Posts: n/a
Default Re: Union in Views: No Branch Elimination because predicate withNonCor-Subselect ?

Susanne,

I passed your post on. Will post back if/when I get feedback

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
  #3  
Old November 12th, 2005, 06:26 AM
Serge Rielau
Guest
 
Posts: n/a
Default Re: Union in Views: No Branch Elimination because predicate withNonCor-Subselect ?

Answer: Doable in theory. No imediate plans though.
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,335 network members.