Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

varchar nvarchar param length calculation #99

Merged
merged 3 commits into from Jul 1, 2013

Conversation

Projects
None yet
3 participants
Contributor

vavere commented Jun 5, 2013

  1. calculate and use value length
  2. for nvarchar storage size is two times n bytes
    http://msdn.microsoft.com/en-us/library/ms186939.aspx
  3. no need for big buffer if param value is null

This should definitely be merged - incorrectly running queries with varchar(8000) causes a massive performance hit.

pekim added a commit that referenced this pull request Jul 1, 2013

Merge pull request #99 from vavere/varchar-nvarchar-param
varchar nvarchar param length calculation

@pekim pekim merged commit faa2c50 into tediousjs:master Jul 1, 2013

1 check passed

default The Travis CI build passed
Details
Collaborator

pekim commented Jul 1, 2013

Do all of the existing integration tests still pass? If not I'll take a look (unless someone else wants to).

momow pushed a commit to momow/tedious that referenced this pull request Oct 15, 2014

momow pushed a commit to momow/tedious that referenced this pull request Oct 15, 2014

momow pushed a commit to momow/tedious that referenced this pull request Oct 15, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment