Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create an index on a view?

Status
Not open for further replies.

GT98SVO

Programmer
Jan 10, 2001
25
0
0
US
CREATE INDEX Hierarchy_Div_ID ON CPSADMIN.Hierarchy_VW(CP_DIVISION_ID);

Oracle Error: View not appropriate here.

Using Oracle 8i(8.1.7).

Much thanks
 
You can create indexes on the underlieing tables I tried to remain child-like, all I acheived was childish.
 
Oracle 8i doesn't allow indexes to be created on views. That's why you're seeing the error.

This limitation is not true on other databases. For example, SQL Server 2000 does allow indexes on views, as I found out recently, much to my surprise.
 
oracle does not allow creation of indexes on views because when a query is executed on the view it usess indexes of underlying tables. Instead you can analyze the query to find out if your query on view is using indexes of the underlying tables.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top