{"action":"created","issue":{"url":"https://api.github.com/repos/denisenkom/go-mssqldb/issues/67","labels_url":"https://api.github.com/repos/denisenkom/go-mssqldb/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/denisenkom/go-mssqldb/issues/67/comments","events_url":"https://api.github.com/repos/denisenkom/go-mssqldb/issues/67/events","html_url":"https://github.com/denisenkom/go-mssqldb/issues/67","id":55087729,"number":67,"title":"Performance issue connecting to MSSQL","user":{"login":"robarc","id":10640088,"avatar_url":"https://avatars.githubusercontent.com/u/10640088?v=3","gravatar_id":"","url":"https://api.github.com/users/robarc","html_url":"https://github.com/robarc","followers_url":"https://api.github.com/users/robarc/followers","following_url":"https://api.github.com/users/robarc/following{/other_user}","gists_url":"https://api.github.com/users/robarc/gists{/gist_id}","starred_url":"https://api.github.com/users/robarc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robarc/subscriptions","organizations_url":"https://api.github.com/users/robarc/orgs","repos_url":"https://api.github.com/users/robarc/repos","events_url":"https://api.github.com/users/robarc/events{/privacy}","received_events_url":"https://api.github.com/users/robarc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-21T22:34:26Z","updated_at":"2015-02-24T01:51:15Z","closed_at":null,"body":"Thanks for the nice library.  It's great to have access to SQL Server on Go!\r\n\r\nI wrote a very simple client which connects to my local SQL Server 2012 instance and does a very simple select statement.  I then wrote a similar ASP.Net Web API service and compared the performance of each using JMeter just doing a whole bunch of simultaneous get requests.  Both saturate the CPU, but they look very different in how they use resources which is weird.  I was very surprised to see that the Go process uses up 340% of the CPU resources on SQL Server that the ASP.Net Web API server does.  Thinking that Web API must be doing some optimization, I added a trace in SQL Server and found that both are running the same number of queries.  And, the queries are the same between the two servers.  I was also very confused about the \"Local Security Authority Process\" which is using 12.7% of the Go server and nothing with Web API.  If I remove the SQL query, LSASS disappears from the list.  Having never heard of this process before, I looked it up on Wikipedia and found that: \"(LSASS), is a process in Microsoft Windows operating systems that is responsible for enforcing the security policy on the system. It verifies users logging on to a Windows computer or server, handles password changes, and creates access tokens.\"  Are you doing some policy enforcement on every query or something like that?  Thinking it had something to do with encryption, I tried to change the settings for encryption in the connection string, and then it failed every time.  I'll log a separate bug for that issue.  \r\n\r\nIn summary:\r\n1. Why would the go driver which is doing the same thing as .Net Web API consume 340% of the SQL Server CPU resources?\r\n2. Why is the Local Security Authority Process using so much CPU with the Go REST server and nothing with ASP.Net Web API?\r\n\r\nHere's a snapshot of it running the Go REST server:\r\n![image](https://cloud.githubusercontent.com/assets/10640088/5846416/4a924c86-a178-11e4-9ce4-c725cc410d39.png)\r\n\r\n\r\nHere's a snapshot of it running the IIS Web API server:\r\n![image](https://cloud.githubusercontent.com/assets/10640088/5846381/ff37417e-a177-11e4-8ee0-d88b135793fd.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/denisenkom/go-mssqldb/issues/comments/75683791","html_url":"https://github.com/denisenkom/go-mssqldb/issues/67#issuecomment-75683791","issue_url":"https://api.github.com/repos/denisenkom/go-mssqldb/issues/67","id":75683791,"user":{"login":"denisenkom","id":2815692,"avatar_url":"https://avatars.githubusercontent.com/u/2815692?v=3","gravatar_id":"","url":"https://api.github.com/users/denisenkom","html_url":"https://github.com/denisenkom","followers_url":"https://api.github.com/users/denisenkom/followers","following_url":"https://api.github.com/users/denisenkom/following{/other_user}","gists_url":"https://api.github.com/users/denisenkom/gists{/gist_id}","starred_url":"https://api.github.com/users/denisenkom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denisenkom/subscriptions","organizations_url":"https://api.github.com/users/denisenkom/orgs","repos_url":"https://api.github.com/users/denisenkom/repos","events_url":"https://api.github.com/users/denisenkom/events{/privacy}","received_events_url":"https://api.github.com/users/denisenkom/received_events","type":"User","site_admin":false},"created_at":"2015-02-24T01:51:15Z","updated_at":"2015-02-24T01:51:15Z","body":"Are you using the same authentication method and encryption settings in go and .Net?"}}