Threading in unixODBC

unixODBC uses a strong thread-locking policy that causes big locks with the default configuration for FreeTDS. Performance of multi-threaded applications can be affected because every operation is serialized. To avoid this problem, choose a threading model in odbcinst.ini.

Example 5-5. Sample odbcinst.ini for threading model

	Driver = /usr/local/freetds/lib/
	Threading = 1

Example 5-6. Sample odbc.ini for threading model

	Driver = FreeTDS
	Server = myServer1
	Port = 1433
	TDS_Version = 7.2
You can use also a connection string e.g. DRIVER=FreeTDS;SERVER=myServer1;PORT=1433;TDS_Version=7.2;.