Re: When are projections done?

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Tue, 2 Mar 2010 20:25:42 -0000
Message-ID: <csKdnbjTydzb6RDWnZ2dnUVZ8nSdnZ2d_at_bt.com>



"jbdhl" <jbirksdahl_at_gmail.com> wrote in message news:a6342b7f-315f-4e33-b6b7-c5d0a35724c3_at_t23g2000yqt.googlegroups.com...
> Consider a table and a query referring to only a subset of the columns
> in that table. How early in the query evaluation is the projection
> carried out?
>
> Are the columns to be selected filtered out as early as in the very
> access method that reads the table rows from the buffer, or are the
> projection handled later, after the whole row has been fetched by the
> access method?
>
> Does it depend on the complexity of the query, how far down the three
> that the projection is handled out?
>
> Thanks!

At the earliest possible moment.

If you use dbms_xplan, one of the less well-known format options is "advanced" which will give a list of the columns projected at each line of the plan. (Funnily enough, the "advanced" option gives more data than the "all" option.)

http://jonathanlewis.wordpress.com/2008/03/06/dbms_xplan3/

-- 
Regards

Jonathan Lewis
http://jonathanlewis.wordpress.com
Received on Tue Mar 02 2010 - 14:25:42 CST

Original text of this message