Schema Binding in SQL Server Views with indexes

There are ways to optimize your views i.e. by adding indexes on your views. In order to achieve this tunning you shoudl first create view with Schema binding.
This is very Simple see SQL below.

CREATE VIEW [dbo].[vw_sampleView] WITH SCHEMABINDING AS
Select * from tbl_Sample

i.e. You just need to add bold text while creating your views. This will allow you to define index on your views which will result as tunned queries to your databases.

Comments

Popular posts from this blog

Sharepoint 2007 Showing outlook Inbox using outlook active X control

IIS Configuration Error Error: Cannot write configuration file due to insufficient permissions

Grails - Introduction