When Using STUnion to construct a polygon, is it faster to do it on code or let the Database handle it?

StackOverflow https://stackoverflow.com//questions/9592414

  •  08-12-2019
  •  | 
  •  

質問

I was just wondering which is faster:

  1. Constructing a wkt polygon using SQLGeography's STUnion method.
  2. 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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top