Salvador
Salvador

Reputation: 16472

Question about Microsoft OLE DB Provider for SQL Server

Actually i am using the Microsoft OLE DB Provider for SQL Server with ADO, my question is about the Packet Size parameter which is used in the connection string, the MSDN documentation says

Packet Size Indicates a network packet size in bytes. The packet size property value must be between 512 and 32767. The default SQLOLEDB network packet size is 4096.

exist any benefit or drawback in the performance for my application if i am use the max value (32767) for this parameter?

Upvotes: 1

Views: 1285

Answers (2)

user2708351
user2708351

Reputation: 139

If you just do bulk load/upload set to maximum.

The bigger packet is better. It is not padded when you actually transfer smaller amount of data as Kevin mentioned. Smaller packets are reasonable if your connection is unstable and you want your data display faster as soon as arrives first records. With bigger packets you will have to wait "longer" until you get first results.

Upvotes: 0

Kevin Stricker
Kevin Stricker

Reputation: 17388

You would use small packet size to tune for many short small transactions, and large packet size to tune for fewer large transfers.

Reason: Too large of a packet size on small transfers, and you waste resources transferring padded data. Too small of a packet size on large transfers and you waste resources generating/transferring packet headers.

Upvotes: 2

Related Questions