Can we create index on views?




Answers were Sorted based on User's Feedback



Can we create index on views?..

Answer / madhoosapre

An index cannot be defined on a view. Because view is
virtual table, which consists of a subset of columns from
one more tables.

The Restrictions imposed on views are as follows:
1. A view can be created only in the current database.
2. A view can be created only if there is a SELECT
permission on its base table
3. A Trigger or an Index cannot be defined on a view.
4. A view cannot be derive its data from temporary tables.
5. The CREATE VIEW statement cannot be combined with other
SQL statements in a single batch.

Is This Answer Correct ?    144 Yes 67 No

Can we create index on views?..

Answer / mkjmkumar

We can Define a Synonym on View.

Is This Answer Correct ?    86 Yes 16 No

Can we create index on views?..

Answer / ashok naik

Yes that is called indexed views using this we can improve
Query performance if your view contain single select
stament then we can easily establish unique clusterd index

Is This Answer Correct ?    62 Yes 20 No




Can we create index on views?..

Answer / deepak

We can create indexes on materialised views

Is This Answer Correct ?    48 Yes 7 No

Can we create index on views?..

Answer / md sajjad

No We cannot create index on view:
e.g
1* create view emp_view as select * from emp where
deptno=20
SQL> /

View created.


1* create index indx_emp on emp_view(empno)
SQL> /
create index indx_emp on emp_view(empno)
*
ERROR at line 1:
ORA-01702: a view is not appropriate here

Is This Answer Correct ?    38 Yes 16 No

Can we create index on views?..

Answer / janaka

Yes we can create Indexed view.
use
CREATE UNIQUE CLUSTERED INDEX i_IndexA

ON View_Name(field1,field2)

Is This Answer Correct ?    54 Yes 35 No

Can we create index on views?..

Answer / khushin dhulla

yes

Is This Answer Correct ?    14 Yes 8 No

Can we create index on views?..

Answer / prakasam

yes. we can.

http://msdn.microsoft.com/en-us/library/aa258260
(v=sql.80).aspx - Refer the url

Is This Answer Correct ?    5 Yes 2 No

Can we create index on views?..

Answer / karthik

clear short article about Indexed View
http://mssqltipsandtricks.blogspot.com/2012/01/index-on-views.html

Is This Answer Correct ?    2 Yes 0 No

Can we create index on views?..

Answer / itishree chhotray

View should be Schema binding,before creating index on view.
We can create Unique Clustered index on view after that we
can create non clustered index but we should have at least
one unique clustered index on view.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer



More Oracle General Interview Questions

Database is hung. Old and new user connections alike hang on impact. What do you do? Your SYS SQLPLUS session IS able to connect.

0 Answers  


What is the difference between Sleep and Wait? (Java)

1 Answers   RBS,


What is cursor

4 Answers   TCS,


I creat Credit memo in AR. Now i want revers the Credit Memo.how you can revers that what out any aditional entry.

0 Answers   GTL,


Table Has C1 And C2 Column If Exits any record in c1 then Update c2 record Otherwise insert new record in the C1 And C2 (Using Procedure)

4 Answers   Thermotech,






For a field in a repeating frame, can the source come from the column which does not exist in the data group which forms the base for the frame ?

0 Answers   Oracle,


What is a Shared SQL pool ?

2 Answers  


what is RAID technology?which is better RAID 0+1 OR RAID 5?

2 Answers   CSC,


What is the use of Control File ?

3 Answers  


4. Display the order number and client number from the ORDER table. Output the result in the format. Client <clientno> ordered <orderno>

1 Answers   Wipro,


what are pseudocolumns?

4 Answers  


What is an Oracle view?

1 Answers  






Categories