Wednesday, March 28, 2012

Performance gain on specifying SqlDbType on parameter

How much if any of a perf gain is there when you specify the SqlDbType on a parameter?There is a perf gain, since it is listed as a performance tip inChapter 12 - Improving ADO.NET Performance of the Improving .NET Application Performance and Scalability guide.

Here is what the guide says:

Specify Parameter Types
When you create a new parameter, use the relevant enumerated type to specify the data type of the parameter. Use an enumerated type such as SqlDbType or OleDbType. This prevents unnecessary type conversions that are otherwise performed by the data provider.

No comments:

Post a Comment