Packet Size
- Last Updated: May 24, 2022
- 1 minute read
- DataDirect Connectors
- ODBC
- SAP Sybase IQ 8.0
- Documentation
Attribute
PacketSize (PS)
Purpose
Determines the number of bytes for each database protocol packet that is transferred from the database server to the client machine. Adjusting the packet size can improve performance. The optimal value depends on the typical size of data that is inserted, updated, or returned by the application and the environment in which it is running. Typically, larger packet sizes work better for large amounts of data. For example, if an application regularly returns character values that are 10,000 characters in length, using a value of 32 (16 KB) typically results in improved performance.
Valid Values
-1 | 0 | x
Behavior
If set to -1, the driver uses the maximum packet size that
is set by the database server.
If set to 0, the driver uses the default packet size that
is used by the database server.
If set to x, an integer from 1 to 127, the driver uses a packet size that is a multiple of 512 bytes. For example, PacketSize=8 means to set the packet size to 8 * 512 bytes (4096 bytes).
Notes
- The
ODBC connection attribute SQL_ATTR_PACKET_SIZE provides the same functionality
as the Packet Size option; however, SQL_ATTR_PACKET_SIZE and the Packet
Size option are mutually exclusive. If Packet Size is specified,
the driver returns the message
Driver Not Capableif an application attempts to call SQLSetConnectAttr() for SQL_ATTR_PACKET_SIZE. If you do not set the Packet Size option, application calls to SQLSetConnectAttr() for SQL_ATTR_PACKET_SIZE are accepted by the driver. - This connection option can affect performance.
Default
0