Can we create index on view? [message #197331] |
Wed, 11 October 2006 00:12  |
vikasg2006
Messages: 80 Registered: March 2006 Location: Dubai
|
Member |
|
|
hy
Can we create index on view? And is really view make improves the query? If yes then how? One more thing when we create a view is data stored in a view is order by or indexed already if i cannot mention order by clause at the time of view creation (here we suppose that the base table have 2-3 indexes already). Actually today i create one view but still not find any much difference in performance improved?
vikas
|
|
|
Re: Can we create index on view? [message #197340 is a reply to message #197331] |
Wed, 11 October 2006 00:33  |
 |
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
Can you create an index on a view?
A view is a stored select statement, not stored data. So, if you want an index you should make it on the base table(s). Note that you can create an index on a materialized view (snapshot).
Is a view sorted by default?
If you don't provide an order by in a view's select statement, the data is not sorted. If Oracle performs an index scan, it might be sorted but there is no guarantee.
Does a view improve performance?
As a view is a stored select statement, it does not guarantee to increase performance. If the SQL is poorly written, the view will not perform very well.
MHE
|
|
|