Analyze Schema



ANALYZE SCHEMA scans a schema and reports its document count and sizes. With IncludePhysicalPages = true it also scans each index and reports its statistics. Requires the Manage permission on the schema.

Optional parameters

  • IncludePhysicalPages = true or false (default false): include the statistics of each index.


The results have the columns Property and Value:
  • Schema, Document Count, Total Data, Min Doc Size, Max Doc Size, Avg Doc Size and Index Count.
  • For each index (with IncludePhysicalPages): its fields, whether it is Unique, the Distinct Keys (distinct values), the Total Doc Refs (indexed documents), the Min/Max/Avg Docs per Key and the Selectivity (distinct keys divided by documents; 100% means every value identifies a single document).


round-pushpin Analyzes the Word schema.
ANALYZE SCHEMA WordList:Word

round-pushpin Analyzes the Word schema and its indexes.
ANALYZE SCHEMA WordList:Word WITH (IncludePhysicalPages = true)




SQL :: Alter Index
Creates and drops indexes and unique keys.
SQL :: Alter Schema
Creates, alters and drops schemas.
SQL :: Analyze Index
Reports the statistics of an index.
SQL :: Create Index
Creates an index or a unique key to speed up queries.
SQL :: Keywords
A breakdown of all of the statements and keywords supported by the query processor.
SQL :: Rebuild Index
Rebuilds an index from the documents in its schema.