I have a requirement to create a report that kills the processor and takes a lot of time.
I think I could speed this up significantly by creating an index that stores all this data in one place, which will simplify the query / report. This opinion will not just be used for reporting, because I think it will benefit several areas in the data layer.
An indexed view could potentially contain 5 million + records, I don't seem to find any indication as to where the indexed views are no longer recommended. I assume that an index of this size will take a long time to build when SQL starts over, but I hope that after that the cost of maintaining it will be minimal.
Is there any best practice guide on when to use index views and when not to use them? Will the view be rebuilt after each server is restarted, or will it be stored somewhere on disk?
Gavin source
share