Timeline for Some SQL Server geospatial queries take much, much longer than others
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 13, 2016 at 15:49 | vote | accept | Ken Smith | ||
Jun 13, 2016 at 0:28 | history | tweeted | twitter.com/StackDBAs/status/742151551515537408 | ||
Jun 12, 2016 at 14:11 | answer | added | Vladimir Baranov | timeline score: 6 | |
Jun 12, 2016 at 2:45 | comment | added | Hannah Vernon♦ |
@KenSmith - I think Erik is attempting to understand if there is a potentially bad plan being generated that is causing the slow queries. If you can do tests on a non-production system, try dbcc freeproccache then run a query for the northern part of a state to see if it is quick.
|
|
Jun 11, 2016 at 23:19 | comment | added | Ken Smith | @Austin - Not sure about your first question. We're trying to read the data, not insert it. (When we do insert it, during our seeding process, we're inserting it using Entity Framework, having read the data from a base CSV file.) For your second, actually, this is precisely what geospatial indexes are for. And when they work, they work really pretty well, with much less memory usage and faster than I'd be able to code up by hand, I'm pretty sure. | |
Jun 11, 2016 at 23:18 | comment | added | Ken Smith | @sp_BlitzErik - In production, we're using Entity Framework. But the problem shows up every way I've run the query so far. | |
Jun 11, 2016 at 18:17 | comment | added | Austin | Also it may be a good idea to run these calculations in a program rather than in a database. | |
Jun 11, 2016 at 17:42 | comment | added | Austin | Also how are you trying to do the insert? Are you doing this through SSMS, or some sort of application? | |
Jun 11, 2016 at 17:16 | comment | added | Erik Reasonable Rates Darling | Do you always use local variables, or do you call a stored procedure where those variables are passed in? | |
Jun 11, 2016 at 16:56 | review | First posts | |||
Jun 12, 2016 at 2:46 | |||||
Jun 11, 2016 at 16:48 | history | asked | Ken Smith | CC BY-SA 3.0 |