Geodatabase indexing
Indexing is the de facto optimization standard for databases. It is a very powerful and effective tool that can help speed up the retrieval of records. Without indexing, a table is scanned entirely to retrieve a particular record. So, if we have a dataset with n records, the worst-case scenario is that the record we are trying to locate is the last record in that table, and thus we need to search through n records in order to reach it. Imagine a feature class with a million features, and the time taken to visit each feature is 1 millisecond; this means we need 17 minutes to scan the entire dataset. Of course, the response time depends on the record you are looking for; if it is located at the beginning of the feature class, it will take less time to be located.
Attribute indexing
Take a look at the Food_and_Drinks
feature class in the following table. You can find this updated geodatabase in the supporting files for this chapter in 8648OT_04_Files
, which can be downloaded...