Search for existing suggestions

TO BE OR NOT TO BE SPATIAL ; it’s a MUST HAVE

If you make a spatial query today using entity framework 6.1 , it ALWAYS makes a full table-scan , which takes forever for large tables. IT DOESN’T MAKE USE OF THE SPATIAL INDEX especially defined for that spatial column.
Well, T-SQL DOES USE a spatial index , like this:

SELECT TOP 1 *
FROM myTable WITH(index([SpatialIndex-mySpatialIndex_1]))
WHERE ogr_geom2.STIntersects(@Point) = 1
ORDER BY ogr_geom2.STDistance(@Point) ASC

But today , entityFramework 6.1 is not able to make use of the same , SUPER_FAST spatial index. It only does something like this:
System.Linq.IQueryable<SharpMapForm.soluri> d33 = null;
d33 = db.soluris.Where(x => x.ogr_geom2.Intersects(dbM) && x.ogr_geom2.InteriorRingCount >= 1);

And it does it painfuly slow, unbearably slow, so you HAVE TO write a t-sql userStoredProcedure , like the one above, update the model from the database, by importing the storedProcedure, then edit the model-function-imports ... Just think how beneficial for you and me, would be, for entityframework to be able to directly make use of spatial-indexes.
SO, THIS IS AN EMERGENCY.
this isn’t some kind of joke , it isn’t even an option ...

3 votes
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)

We’ll send you updates on this idea

constantin prigoreanu shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base