Re: When are projections done?

From: joel garry <joel-garry_at_home.com>
Date: Wed, 3 Mar 2010 09:02:01 -0800 (PST)
Message-ID: <6a42f9ab-a72b-4413-a9b1-410ba5b78a33_at_z1g2000prc.googlegroups.com>



On Mar 2, 1:24 pm, "The Boss" <use..._at_No.Spam.Please.invalid> wrote:
> jbdhl wrote:
> > 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!
>
> What problem are you trying to solve, given the fact that you've been asking
> this very same question in groups/forums for 3 different DBMS's:
> comp.databases.oracle.server
> comp.databases.ibm-db2http://www.eggheadcafe.com/software/aspnet/35820528/when-are-projecti...
> (MSSQL-forum)
>
>

Obviously, he wants to know the mechanics of how each engine does this fundamental task. That's a good thing, in my opinion, I'd _like_ to see a Kyte-style exposition of these all together. I don't think the concepts and performance guides really cover this as they should, and if there are decent 3rd party books, everyone would like to know.

Of course, asking the question this way avoids the whole concurrency issue, which makes value judgements of the engines based on these mechanics, well, baseless. If the OP is going there, that would likely be a mistake.

I think tools such as tracing could/should be improved to make this process more clear. The trace analysis tools have a long way to go, and of course are limited by available instrumentation. There's a big gap between the GUI tools, which (incorrectly) assume complete control as well as a usage by the clueless, and the more sophisticated tools which assume a certain level of knowledge (as the OP doesn't have - note for example he seems unclear about how Oracle uses blocks and row locking rather than pages - and most people wouldn't).

jg

--
_at_home.com is bogus.
http://www.oraclestore.com/images/products/489644.jpg
Received on Wed Mar 03 2010 - 11:02:01 CST

Original text of this message