Searching by Using the SELECT * Statement
Topic Last Modified: 2006-11-06
Important
Use Exchange Web Services to search for items in the Exchange database. For more information see Web Services.
A SELECT * statement returns all the properties identified in the expected content class list for the specified folder. When constructing this list of properties to return, the schema scope for the folder is used. If any required schema definition items are not present within this schema scope, only the default properties for items are returned.
Similarly, sending a PROPFIND Method using the WebDAV protocol with a depth of 1 to find all item properties returns only the properties defined by the expected content classes of the folder.
Using SELECT * can be an unnecessarily broad use of a Structured Query Language (SQL) query and may return information that will not be used by the application. In most instances, queries with specified property names and other search criteria will provide better results. Using SELECT * also results in the Exchange store having to look up the schema for item being searched so that it can determine which set of properties to return. This schema lookup can be expensive and may constitute a large part of the search process.