{"action":"created","issue":{"url":"https://api.github.com/repos/gaspardle/mapnik-mssql/issues/11","repository_url":"https://api.github.com/repos/gaspardle/mapnik-mssql","labels_url":"https://api.github.com/repos/gaspardle/mapnik-mssql/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/gaspardle/mapnik-mssql/issues/11/comments","events_url":"https://api.github.com/repos/gaspardle/mapnik-mssql/issues/11/events","html_url":"https://github.com/gaspardle/mapnik-mssql/issues/11","id":113737802,"number":11,"title":"Trace flag 4199 and filter vs intersects","user":{"login":"BHare1985","id":2180284,"avatar_url":"https://avatars.githubusercontent.com/u/2180284?v=3","gravatar_id":"","url":"https://api.github.com/users/BHare1985","html_url":"https://github.com/BHare1985","followers_url":"https://api.github.com/users/BHare1985/followers","following_url":"https://api.github.com/users/BHare1985/following{/other_user}","gists_url":"https://api.github.com/users/BHare1985/gists{/gist_id}","starred_url":"https://api.github.com/users/BHare1985/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BHare1985/subscriptions","organizations_url":"https://api.github.com/users/BHare1985/orgs","repos_url":"https://api.github.com/users/BHare1985/repos","events_url":"https://api.github.com/users/BHare1985/events{/privacy}","received_events_url":"https://api.github.com/users/BHare1985/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-28T03:42:33Z","updated_at":"2016-06-21T04:12:28Z","closed_at":"2016-06-21T04:12:28Z","body":"Sql Server can be really dumb about when to use spatial indices. Enabling `OPTION(QUERYTRACEON 4199)` seems to help a lot but AFAIK it has to be appended at the end of a query.\r\nEnabling the trace flag 4199 globally can has negative effects so it would be great if there was an option for us to have it be sent with the query/session that mapnik is using so we can get the benefits without running the risk enabling the flag outside mapnik.\r\n\r\n\r\nAlso, this is a minor thing but according to http://social.technet.microsoft.com/wiki/contents/articles/9694.tuning-spatial-point-data-queries-in-sql-server-2012.aspx it seems that `filter` can be much quicker than `STIntersects`, but it has some false positives so it would be neat if there was an option to use `filter` at a certain zooms and then once it reaches a point where accuracy matters much more switch to `STIntersects`"},"comment":{"url":"https://api.github.com/repos/gaspardle/mapnik-mssql/issues/comments/227336084","html_url":"https://github.com/gaspardle/mapnik-mssql/issues/11#issuecomment-227336084","issue_url":"https://api.github.com/repos/gaspardle/mapnik-mssql/issues/11","id":227336084,"user":{"login":"BHare1985","id":2180284,"avatar_url":"https://avatars.githubusercontent.com/u/2180284?v=3","gravatar_id":"","url":"https://api.github.com/users/BHare1985","html_url":"https://github.com/BHare1985","followers_url":"https://api.github.com/users/BHare1985/followers","following_url":"https://api.github.com/users/BHare1985/following{/other_user}","gists_url":"https://api.github.com/users/BHare1985/gists{/gist_id}","starred_url":"https://api.github.com/users/BHare1985/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BHare1985/subscriptions","organizations_url":"https://api.github.com/users/BHare1985/orgs","repos_url":"https://api.github.com/users/BHare1985/repos","events_url":"https://api.github.com/users/BHare1985/events{/privacy}","received_events_url":"https://api.github.com/users/BHare1985/received_events","type":"User","site_admin":false},"created_at":"2016-06-21T04:12:28Z","updated_at":"2016-06-21T04:12:28Z","body":"As for the stored procedure idea, one of your forks did just that https://github.com/jc101/mapnik-mssqlsp  (wasn't able to contact him to see if he got it working).\r\n\r\nI am closing this because the two suggested feature requests have been implemented"}}
{"actor":{"display_login":"BHare1985"}}