If there exist a index on the table, and we then make a
view on that table (include the indexed column from base
table) than why do we require indexing on view?Doesnt it
create an overhead?

Answers were Sorted based on User's Feedback



If there exist a index on the table, and we then make a view on that table (include the indexed co..

Answer / sql2000

Lets start on what a view is, view is a name given to a
select statement. The select statement is executed when the
view name is called.

When you create index on the view the select statement is
materialized into a table and we have the contents of the
select statement as a table. This makes it faster at times
to run select statements on rather than the actual tables.
Hence it makes sense to create indexes on views.

Let me know if anyone has a better point of view on
this. :)

Is This Answer Correct ?    0 Yes 0 No

If there exist a index on the table, and we then make a view on that table (include the indexed co..

Answer / rama krishna

it depends on search critiria for view

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More SQL Server Interview Questions

what is an extended stored procedure? : Sql server database administration

1 Answers  


What is rolap and its advantage? : sql server analysis services, ssas

1 Answers  


When we are using this query to shrink the log file,what exactly it will execute internally? Do we lose any data when we run this script? which data it will truncate in the log file and where it is saved. Please let me know... USE DatabaseName GO DBCC SHRINKFILE(<TransactionLogName>, 1) BACKUP LOG <DatabaseName> WITH TRUNCATE_ONLY DBCC SHRINKFILE(<TransactionLogName>, 1) GO

1 Answers   Cognizant,


What are sp_configure commands and set commands?

1 Answers  


difference between truncate, delete aur drop?

2 Answers  


How to count duplicated values in a column in ms sql server?

1 Answers  


What does select 1 mean?

1 Answers  


Explain for xml explicit mode?

1 Answers  


Which is the main third-party tool used in sql server?

1 Answers  


Can you pass expressions to stored procedure parameters?

1 Answers  


What to check if a User database is locked?

1 Answers   TCS,


What happens if null values are involved in string operations?

1 Answers  


Categories