5 Strategies for ArcObjects Developers By Robert Stauder, Esri Applications Developer Code Listing 1: Use SubFields What It Does: The first performance improvement suggestion involves limiting how much data an application fetches. The SubFields property of The database will search less data and send fewer packets across the network. How to Use: Achieving better enterprise database performance What can ArcObjects developers do to increase performance of an enterprise application that uses data from ArcSDE? While many application developers and database administrators (DBAs) approach database tuning that will help developers squeeze more performance from their applications. Using the Code Samples and Data a code listing that uses the Parcels features class from the Building a Geodatabase data that comes with the ArcGIS sample dataset. The Parcels feature class resides in the LandBase feature dataset of the Montgomery File Geodatabase. Load the data into an ArcSDE database using Download the code samples from ArcUser Online (www.esri.com/arcuser). These samples use ArcGIS When to Use: Code Listing 2: Combine Spatial and Attribute Queries What It Does: One of the most powerful aspects of ArcGIS is the ability to combine the spatial and attribute components of a query so you can issue fewer queries and make those queries more selective. number of features searched. use ArcInfo licenses. The code accesses licenses using the make samples as lean as possible and improve readability. connection file to a directory of your choice and reference this file when running the programs. Because two of the and save your connection file referencing that version. ArcGIS supports combined spatial and attribute queries against enterprise geodatabase data. The query in Code Listing 2 restricts the number of rows traversed because features must be contained in the red box and have an area greater than 121,000. Those features are highlighted in yellow. How to Use: Set the SearchOrder property to control which query component esriSearchOrderAttribute sets the search order to attribute first. esriSearchOrderSpatial sets the search order to spatial first. Set SearchOrder to the most restrictive option. If your query When to Use: Use for any query having both spatial and attribute qualities. Optimize spatial queries by applying an attribute constraint to them. ArcUser Fall 2009 www.esri.com