[freetds] SQL connection question
James K. Lowden
jklowden at freetds.org
Wed May 3 22:58:01 EDT 2006
Andrew Ballard wrote:
> I don't really know much about database
> drivers, but I'd like to know if FreeTDS benefits (or can benefit) from
> the same difference that made the OLDEB driver perform so much better
> over ODBC.
The answer is No. Even if it were Yes it would be No, because no one is
implementing OleDB except Microsoft.
Whatever difference you saw between OleDB and ODBC was a function of
implementation. As mentioned in the UG, FreeTDS implements a protocol,
and the server recognizes the protocol. There's no way the server can
distinguish between FreeTDS and Microsoft's OleDB client, because they
send the same bits over the wire.
I emphasize the protocol because that's the chokepoint. Latency in the
network is orders of magnitude greater than latency in the driver, so the
magic is in filling up the pipe, moving the bits to and from the server.
If you fill the pipe, your mission is accomplished. As clients have
gotten faster (relative to the network, particularly) it's gotten easier
In theory, maybe, perhaps, the OleDB specification -- to the extent it
exists -- could allow the driver writer to implement something more
efficent than the ODBC specification would permit. (And, btw, I'm no big
proponent of ODBC, as regular readers here know.) But it's far more
likely, IMO, to be a function of driver quality than API specification
constraints. After all, Microsoft invented ODBC and nothing on earth is
stopping them from specifying ODBC 4.0 if that's what they want to do.
FWIW, I've always found db-lib to be plenty fast. More than once my tests
showed db-lib bcp filling the Ethernet bandwidth: 9+ Mb on a 10 Mb link,
More information about the FreeTDS