JezK
Edit File: uothread.html
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Threading in unixODBC</title><link rel="stylesheet" type="text/css" href="userguide.css" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="home" href="index.html" title="FreeTDS User Guide" /><link rel="up" href="configs.html" title="Chapter 5. Advanced Configurations" /><link rel="prev" href="kerberos.html" title="Kerberos Support" /><link rel="next" href="appendmode.html" title="Appending Dump Files" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Threading in unixODBC</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="kerberos.html">Prev</a> </td><th width="60%" align="center">Chapter 5. Advanced Configurations</th><td width="20%" align="right"> <a accesskey="n" href="appendmode.html">Next</a></td></tr></table><hr /></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="uothread"></a>Threading in unixODBC</h2></div></div></div><p><code class="systemitem">unixODBC</code> uses a strong thread-locking policy that causes big locks with the default configuration for <span class="productname">FreeTDS</span>. Performance of multi-threaded applications can be affected because every operation is serialized. To avoid this problem, choose a threading model in <code class="filename">odbcinst.ini</code>. </p><div class="example"><a id="odbcinstthread"></a><p class="title"><strong>Example 5.5. Sample <code class="filename">odbcinst.ini</code> for threading model</strong></p><div class="example-contents"><pre class="programlisting"> [FreeTDS] Driver = /usr/local/freetds/lib/libtdsodbc.so Threading = 1 </pre></div></div><p><br class="example-break" /> </p><div class="example"><a id="odbcinithread"></a><p class="title"><strong>Example 5.6. Sample <code class="filename">odbc.ini</code> for threading model</strong></p><div class="example-contents"><pre class="programlisting"> [Server1] Driver = FreeTDS Server = myServer1 Port = 1433 </pre></div></div><p><br class="example-break" /> You can use also a connection string e.g. <code class="literal">DRIVER=FreeTDS;SERVER=myServer1;PORT=1433;</code>.</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="kerberos.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="configs.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="appendmode.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Kerberos Support </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Appending Dump Files</td></tr></table></div></body></html>