[freetds] Problem with OTL & bulk insert

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Wed Jul 28 11:44:40 EDT 2004


> 
> Hello,
> 
> Attached a simple little test program that is supposed to 
> batch-insert a number of rows.
> 
> What's supposed to happen ( and works on Windows + ODBC ) is 
> that the insert statements are buffered in batches of 50 and 
> then send to the database.
> This saves 49 round-trips for every 50 inserts.
> 
> Unfortunately this does not seem to work on freetds ( or not 
> implemented ). It seems to only insert the first one of every batch.
> 

OTL it's broken, FreeTDS (according to specifications) returns that it
cannot insert multiple rows and OTL ignore the warning and no not take
into account number of rows processed...

> If I change the buffer-size for the insert to 1, then it 
> works fine ( also the select statement with a buffer of 50 
> )... However this defeats the performance issue.
> 
> Currently I am using version: freetds-0.63.dev.20040514.tgz
> 

Use more recent snapshot and --enable-developing option.

> attached are:
> - sample source code
> - odbctrace file
> - otlv4.h file
> 
> ( ps I am using libiodbc-3.51.1 )
> Please advise if you need more information.
> 
> Best regards
> Piet
> 

freddy77



More information about the FreeTDS mailing list