From: jbdhl on
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!
From: John Hurley on
On Mar 2, 6:10 am, jbdhl <jbirksd...(a)gmail.com> wrote:

snip

> 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!

Why does it matter?

Any specific release you are investigating?

Any specific problem query that you are trying to optimize?
From: Michel Cadot on

"jbdhl" <jbirksdahl(a)gmail.com> a �crit dans le message de news: a6342b7f-315f-4e33-b6b7-c5d0a35724c3(a)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!

Oracle does not fetch rows, it reads blocks matching the
conditions you gave and then returns you selected columns
when you fetch the rows.

Regards
Michel


From: Jonathan Lewis on
"jbdhl" <jbirksdahl(a)gmail.com> wrote in message
news:a6342b7f-315f-4e33-b6b7-c5d0a35724c3(a)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



From: jbdhl on
> At the earliest possible moment.

Could that be directly inside the access method that fetches
individual rows from the page in the buffer? Or is the projection
always performed at some point *after* the initial fetch of the
relevant row(s)?
 |  Next  |  Last
Pages: 1 2 3
Prev: Oracle database 10g R2
Next: Query with LONG RAW