Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I am looking for a commecial product that will allow me to connect to MS SQL server via a ODBC connection. It will also allow me to maintain persistent connections.

We currenly use freetds as the middlelayer and DBD::Sybase. The site hangs when it is hit to hard. There are some pages that require 6 hits to the db to generate (this is not my design <--- everything is written in stored procedures so i just call the stored procedures from perl).

I have also tried using the connect_cache method to connect. Does anyone have any recommendations or experiences with high volume, high database activity sites interfacing with SQL Server?

Maybe I can tweak Freetds..somehow?
  • Comment on DBD Driver for linux that will connect to MS SQL Server besides Freetds

Replies are listed 'Best First'.
Re: DBD Driver for linux that will connect to MS SQL Server besides Freetds
by liz (Monsignor) on Aug 16, 2003 at 21:06 UTC
    Are you sure that ODBC is not the bottleneck? Never used ODBC myself, but I've heard that it is very slow.

    Before you start looking for solutions, I think you need to verify what the exact problem is. If you're getting 50 requeste/second and you have 6 queries per page, than a simple calculation shows that your database should be able to handle 300 requests/second, and that your connection should be able to handle the data associated with those requests.

    If your MS SQL server is not able to handle that, then a commercial connection product is not going to help you at all.

    Liz

Re: DBD Driver for linux that will connect to MS SQL Server besides Freetds
by belg4mit (Prior) on Aug 16, 2003 at 21:37 UTC
    You might try using a SQL load balancer, I've posted about them here before.

    --
    I'm not belgian but I play one on TV.

Re: DBD Driver for linux that will connect to MS SQL Server besides Freetds
by gellyfish (Monsignor) on Aug 17, 2003 at 08:27 UTC
Re: DBD Driver for linux that will connect to MS SQL Server besides Freetds
by mpeppler (Vicar) on Aug 17, 2003 at 14:48 UTC
    As someone else mentioned, there is a good chance the the problem has nothing to do with FreeTDS.

    Have you monitored the MS-SQL server during heavy load to see what it is doing? There could be any number of reasons why heavy load causes the system to appear to hang, with the primary cause being locking issues.

    If this is a web site, are you using mod_perl? If so, are you using Apache::DBI? If not, why?

    Michael