What is the sql server materialized view?

242    Asked by Aashishchaursiya in SQL Server , Asked on Mar 15, 2023

Have a bit of glitches from the time I was using SQL Server back in 2006 and the many other databases I played with (and which I have not touched since then).


I need to create a materialised view to quickly get access to the data without overloading the DB but also to pull what was made static by the time the view was created.


SQL Server seems to support the materialised views with the Indexed views, but to be created these require among the other thing the following:


the WITH SCHEMABINDING construct

a clustered INDEX

Failing in that, my understanding is the view is not auto refreshing, which is probably what I need?


My goal is to get a view that I can refresh whenever I nee

CREATE MATERIALISED VIEW xys AS d. So far I created a Materialised view in the SQL 2005 instance I have access to with the following statement:SELECT 123

FROM X
WHERE ...
GROUP BY

Any memory refresher?

Answered by David EDWARDS

For that kind of need, I like to build a SSIS package that will copy the content of the SQL server materialized view to a different SQL DB (on a different instance if I want to make sure their reporting won't hurt the prod DB).


You can then schedule the data refresh when you want and you can also create indexes that would make their reports run faster.


Your Answer

Interviews

Parent Categories