Take the 2-minute tour ×
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.

All,

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?

Thanks!!!

-m

share|improve this question
    
Looks like you've answered your own question. –  Max Vernon Mar 19 at 23:50
    
Should I delete the question, or submit an answer myself? –  mapBaker Mar 20 at 3:25
2  
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 at 4:32

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.