Commerce Server 2002 introduced a feature which allowed content from one or more base catalogs to be aggregated into a virtual catalog using inclusion and exclusion rules. The values for the properties of the products and categories came from the base catalogs. The virtual catalog simply contains references to these included products and categories. In sql terms this means that the virtual catalog is defined as a view which is a union of the included base catalog tables. If the virtual catalog contains a number of base catalogs and/or the base catalogs themselves contain a lot of products and categories executing sql queries on this view can result in poor performance. Given the limitations of indexed views we could not index the virtual catalog view. In order to address performance issues without restricting the number of base catalogs that can be added, CS2002 allowed virtual catalogs to be materialized. In sql terms this means that the virtual catalog view is now materialized to a physical table.Since the queries now run against a physical table the run time queries execute much faster.
Things you should know about virtual catalogs and materializing:
So when should you materialize a virtual catalog?The answer to this question depends on a number of factors:
As a general rule of thumb you should start without materializing a virtual catalog and determine based on the operations that you wish to perform on the virtual catalog, if the desired performance is acceptable or not. If the desired performance is not acceptable then you should consider materializing the virtual catalog. On a related note, we did make a number of performance improvements for virtual catalogs in the upcoming Commerce Server Feature Pack to address the current rebuild and runtime performance issues for virtual catalogs. And finally, this webcast on Virtual Catalogs.