It is mentioned in "Database System Implementation" , section 7.2.4 that when we push projections, it is quite usual for the projection to also remain where it is. Can there be situations where when we push projections, we need not retain the projection at the same place and yet obtain an equivalent logical query plan . For example if we have a relation A with attributes p,q,r and we have the following logical query plan :
Projection(p,q) (Selection(q=3)(A))
Would Selection(q=3) (Projection(p,q) (A)) be a equivalent logical query plan for the above logical query plan? i have pushed the projection down the tree without retaining the projection in its original place since ALL the attributes required by the selection are also included in the projection. Is this correct?