A view is really just a stored SQL statement so if you want to create an index on a view, create the index on the base table instead.
You can't even add constraints on view. Constraints such as Primary key and unique key do occupy spaces because they create a unique index in turn. You can create a view with check option.
Note: Using DISTINCT, GROUP BY or UNION clause in a View implies that no join using an index can be done on this View. These keywords should be avoided.
Note: Using DISTINCT, GROUP BY or UNION clause in a View implies that no join using an index can be done on this View. These keywords should be avoided.
It is not possible in a view but Index can be created on Materialized View.
ReplyDelete