Re: [FreeTDS] connection pool

Frediano Ziglio <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CAHt6W4fdJhZNq0wfeyBL4majOApqmx67tZytgyHGdV=aC4dgVA@mail.gmail.com>
2016-08-31 11:35 GMT+01:00 Xiaobiao Yin <[email protected]>:
> Hi Experts
>
>
>     I use FreeTDS (linux) to communicate with a SQL server 2005 in Windows,
>
> and tried to use [dbcmd() and dbsqlexec()]  100 times to insert 1 item to database tables.
>
>    The performance is that one insert statement consumes about 2~3ms.
>
>
>     I know there is a so called Connection pool, but it only support TDS 4.2 while SQL server need TDS 7.2.
>
>
>    So in order to optimize the performance, I may need to open 2 or more connections, it is a little hard to
>
> control these connections.
>
>
>    My question is that are there some ways to optimize the performace.
>
> The target should be 1ms per 1 insert statement.
>
>
> Any suggetions are welcome.
>
>
> Thanks
>
> Eric
>


It's not clear if the problem is application or connections.
If you have one application that needs to insert rows into a table
it's better to batch the inserts instead of using a query for each
row.
If you have multiple process each needing to connect to database and
insert a row then would be better to use a connection pooling. The
connection pooling included in FreeTDS 1.0 supports protocol 7.2 with
some limitations.

Frediano
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.