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?
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.
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.
精彩评论