zhangfengcdt commented on PR #2831:
URL: https://github.com/apache/sedona/pull/2831#issuecomment-4229783957
ST Function Performance: Geography vs Geometry (cached objects, ns/op)
- ST_NPoints (Level 1 — JTS accessor)
```
┌─────────────────────┬───────────┬──────────┬───────┐
│ Shape │ Geography │ Geometry │ Ratio │
├─────────────────────┼───────────┼──────────┼───────┤
│ Point │ 2 │ 2 │ 1x │
├─────────────────────┼───────────┼──────────┼───────┤
│ LineString (16 vtx) │ 2 │ 2 │ 1x │
├─────────────────────┼───────────┼──────────┼───────┤
│ Polygon (16 vtx) │ 2 │ 2 │ 1x │
├─────────────────────┼───────────┼──────────┼───────┤
│ Polygon (64 vtx) │ 2 │ 2 │ 1x │
├─────────────────────┼───────────┼──────────┼───────┤
│ Polygon (500 vtx) │ 2 │ 2 │ 1x │
└─────────────────────┴───────────┴──────────┴───────┘
```
- ST_Distance (Level 2 — S2 geodesic distance)
```
┌─────────────────────┬───────────┬──────────┬───────┐
│ Shape │ Geography │ Geometry │ Ratio │
├─────────────────────┼───────────┼──────────┼───────┤
│ Point │ 269 │ 12 │ 22x │
├─────────────────────┼───────────┼──────────┼───────┤
│ LineString (16 vtx) │ 1,576 │ 373 │ 4.2x │
├─────────────────────┼───────────┼──────────┼───────┤
│ Polygon (16 vtx) │ 1,419 │ 613 │ 2.3x │
├─────────────────────┼───────────┼──────────┼───────┤
│ Polygon (64 vtx) │ 69,279 │ 3,874 │ 18x │
├─────────────────────┼───────────┼──────────┼───────┤
│ Polygon (500 vtx) │ 224,696 │ 129,518 │ 1.7x │
└─────────────────────┴───────────┴──────────┴───────┘
```
- ST_Contains (Level 3 — S2 predicate)
```
┌─────────────────────┬───────────┬──────────┬───────┐
│ Shape │ Geography │ Geometry │ Ratio │
├─────────────────────┼───────────┼──────────┼───────┤
│ Point │ 284 │ 8 │ 36x │
├─────────────────────┼───────────┼──────────┼───────┤
│ LineString (16 vtx) │ 664 │ 8 │ 83x │
├─────────────────────┼───────────┼──────────┼───────┤
│ Polygon (16 vtx) │ 684 │ 8 │ 86x │
├─────────────────────┼───────────┼──────────┼───────┤
│ Polygon (64 vtx) │ 677 │ 8 │ 87x │
├─────────────────────┼───────────┼──────────┼───────┤
│ Polygon (500 vtx) │ 703 │ 8 │ 88x │
└─────────────────────┴───────────┴──────────┴───────┘
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]