Technically not the answer, but maybe the problem here is in SQL? I think a document storage system like CouchDB could be a much more efficient solution for this scenario.
I think something like this:
{ "_id": "whatever", "_rev": "whatever", "boundingBox": [ [0 0], [2 2] ], "size": [2 2], "circle": { "center": [1 1], "radius": 1 }
}
The string "circle" will change the name and details depending on the shape. Rectangles would have angles (similar to "boundingBox" ), ellipsoids would ... Whatever the ellipsoids define: p
source share