[ 
https://issues.apache.org/jira/browse/DERBY-6036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13547178#comment-13547178
 ] 

Rick Hillegas commented on DERBY-6036:
--------------------------------------

I have verified that there is no special jiggery-pokery to reduce the number of 
columns read from the base table when it is wrapped in a view. For the SELECT 
from the view (select s_nr from vt where ns_r = 3000), the whole row is read 
from the Store.

Fixing this performance problem may be a little tricky. The ProjectRestrict 
nodes are added by the optimizer AFTER the bind-phase has expanded the * in the 
view and concluded that ALL of the columns are being referenced.
                
> If you wrap a view around a RestrictedVTI, the projection is not pushed into 
> the table function.
> ------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-6036
>                 URL: https://issues.apache.org/jira/browse/DERBY-6036
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.10.0.0
>            Reporter: Rick Hillegas
>         Attachments: derby-6036.sql, derbyAST.xml
>
>
> Restrictions are pushed into a restricted VTI if you wrap it in a view. 
> However, projections are not. I will attach a script showing this problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to