|
I did a very simple test using one of our queries with different combinations of Filter and/or STIntersects in the WHERE-clause: a) only Filter: 80836 records in 4215ms b) only STIntersects: 77729 records in 5017ms c) Filter and STIntersects: 77729 records in 11364ms I executed every query using the SQL Server Management Studio and before each query I removed the query plans.
Then I executed every query again using Microsoft JDBC Driver for SQL Server (version 4.0.2206.100) and the time needed to execute the query is pretty similar. Before executing each query, I removed the query plans as well. a) only Filter: 80836 records in 4459ms b) only STIntersects: 77729 records in 5180ms c) Filter and STIntersects: 77729 records in 11604ms
All these tests are executed against SQL Server 2008 R2.
|