To illustrate how much an index helps to accelerate our spatial query, let's return to our spatial database,
Real-World. We have already loaded data from several cities in Great Britain, and at this time we have more than half a million registers saved in our data table. This set of stored records will be good enough for this exercise.
Now, let's develop the spatial query to perform the test. Let's say that we want a query that gives us a list of all the buildings that were one-fourth of a mile from an arbitrary building. To illustrate this, we have chosen the Royal College of Music as a reference point without any particular reason. This image will depict this point graphically:
Our spatial query will, therefore, be: