Hi!
Daniel Kasak wrote:
[EMAIL PROTECTED] wrote:
Views differ from tables in that they cannot be indexed.
I've just started experimenting with derived tables under 4.1.14, and I
had a hunch this was so. Is there any plan to include index support for
views / derived tables?
An index is a separate data structure which must be maintained when the
base table is changed (in the indexed columns).
A view is a restricted (by rows and/or columns) look at a base table.
IMO, having separate indexes for views is not in line with the
relational approach at all.
The way to go is an efficient use of all indexes defined on a table,
whether it is accessed as a base table or via a view.
Any "where condition" in the view definition may be evaluated via base
table indexes, if suitable ones are defined on the base table - provided
the optimizer chooses this access path.
Improving the optimizer would be feature changes, so you should expect
to see that in newer versions only.
Regards,
Joerg
--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]