Schema Caching and Performance


This short topic is a discussion of performance issues. When annotated XDR schemas are queried via an XPath expression, the schema is stored in memory. Being able to cache schemas greatly improves system performance by reducing the amount of direct disk access.

A Registry setting that you can change controls schema cache size . Here's the Registry entry:

 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\SQLXMLX\SchemaCacheSize 

If you don't know what you're doing with the Registry, find someone who does!

If you do something wrong, you could very easily trash the box. Microsoft always issues a disclaimer when it gives out Registry changes, stating that the company will not support calls dealing with changes made to the Registry. You're on your own. Many times, the only recourse is to rebuild the box.

The default value for SchemaCacheSize is 31, and you adjust this setting based on the number of schemas you have and the amount of available memory in the server. If you have the memory, adjust the SchemaCacheSize to be slightly higher than the number of your schemas. If you don't have the memory, you'll have to reduce the size. This will degrade performance, so buy more RAM.

Remember that in production environments, you should enable caching by unchecking the Cache Control box on the Advanced tab of the IIS Virtual Directory Management utility. We talked about this in Chapter 3.



XML and SQL Server 2000
XML and SQL Server 2000
ISBN: 0735711127
EAN: 2147483647
Year: 2005
Pages: 104
Authors: John Griffin

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net