patternModerate
What does the term "projection" refer to in an SQL query (or view definition)
Viewed 0 times
definitionrefertheprojectionwhatsqlquerytermviewdoes
Problem
In Oracle's document The Query Optimizer, under View Merging, I found the following information
The view merging optimization applies to views that contain only
selections, projections, and joins. That is, mergeable views do not contain
set operators, aggregate functions, DISTINCT, GROUP BY, CONNECT BY, and so on.
(emphasis mine)
Yet, I can only guess as what such a projection actually refers to.
The view merging optimization applies to views that contain only
selections, projections, and joins. That is, mergeable views do not contain
set operators, aggregate functions, DISTINCT, GROUP BY, CONNECT BY, and so on.
(emphasis mine)
Yet, I can only guess as what such a projection actually refers to.
Solution
In Relational algebra, projection means collecting a subset of columns for use in operations, i.e. a projection is the list of columns selected.
In a query optimiser step, the projection will manifest itself as a buffer or spool area of some description containing a subset of the columns from the underlying table or operator, or a logical view based on those columns that is used by subsequent operations.
In a view, a projection equates to the list of columns selected in the query underlying the view.
In a query optimiser step, the projection will manifest itself as a buffer or spool area of some description containing a subset of the columns from the underlying table or operator, or a logical view based on those columns that is used by subsequent operations.
In a view, a projection equates to the list of columns selected in the query underlying the view.
Context
StackExchange Database Administrators Q#12619, answer score: 19
Revisions (0)
No revisions yet.