Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


I'm building a view which uses a spatial intersect (STIntersect in MSSQL 2012) between points (student addresses with address information) and polygons (school boundary polygons with school numbers by grade).

The idea is another team will build a stored procedure that will take an address and get the schools and district of that location based on the school boundaries.

The question is: both the points and the polygons have a spatial index. Can or should I use the indices on both tables, or would using one be beneficial over the other?

UPDATE: Running the query twice testing the speed of using either index proved that the spatial index on the point layer was much faster... perhaps this answers my question?



share|improve this question
Looks like you've answered your own question. – Max Vernon Mar 19 '14 at 23:50
Should I delete the question, or submit an answer myself? – DPSSpatial Mar 20 '14 at 3:25
If you can document your procedure well enough then answer your own question. Someone will find it useful I'm sure. – Max Vernon Mar 20 '14 at 4:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.