When Using STUnion to construct a polygon, is it faster to do it on code or let the Database handle it?
-
08-12-2019 - |
質問
I was just wondering which is faster:
- Constructing a wkt polygon using SQLGeography's STUnion method.
- Constructing a wkt polygon using the STUnion method built into MS SQL Server.
I only ask because I wanted to be sure. I'm assuming that if I went with 2, querying and constantly updating the database would increase the amount of time it takes to process/create the data. This would be through one connection so there wouldn't be a need to reconnect every time something needed to be added.
解決
I did some benchmarks and constructing the polygons using the STUnion method in C# was at least twice as fast.
所属していません StackOverflow