Up Prev Next
From: Michael Peppler <mpeppler at MBAY dot NET>
Subject: Re: DBlib vs CTlib, please give me a clue!
Date: Oct 10 1997 2:20PM
Stephen H. Price wrote:
> Greetings to all, I have some questions about the
> difference/advantages/performance of DBlib versus CTlib (or should that be
> CTlib vs DBlib?) . Which is better? Which is faster? Which is easier?
> Clueless minds like myself want to know.
> The FAQ states that CTlib was developed with Sybase's help and that Sybase
> recommends this as the way to go in the future. My own experience has been
> DBlib. Initially sybperl 1.x , but I've recently made the transition to
> sybperl 2.07.
> My motivation for asking this questions is that my users are complaining
> that the Sybase::DBlib, CGI scripts I've developed take too long to
> execute. I'd like to improve performance.
> Background: 2 CPU Sparc 1000, Solaris 2.5, Perl 5.04_001, Sybperl 2.07,
> Sybase 11 on an ES3000, connecting over a fast ethernet switch.
> Simple SQL statements like
> select * from whosyall where name like '%smith%'
The CTlib module has a higher raw startup time because it needs
to read in the locale file, and needs to map in 5 or 6 shared
libraries, instead of just libsybdb.so. This is mitigated on a
machine that already runs several processes that use those libraries,
because they will be cached in memory.
Also, I understand that Client Library in OpenClient 11.x is faster
than the 10.x version.
Now your best bet to improve performance for CGI scripts is to use
the Apache server with mod_perl, as this allows you to a) run CGI
scripts without the overhead of a fork()/exec() and b) have
persistent database connections, thus cutting down on execution
time in the two areas that are the most sensitive on a potentially
As DBlib vs CTlib I would say that for the type of queries you are
doing you can use either, it won't make much difference (I think
it's more a question of taste), unless your databases have a lot
of numeric/decimal data, in which case the support for those
datatypes is more developped in the CTlib module.
Michael Peppler -||- Data Migrations Inc.
firstname.lastname@example.org -||- http://www.mbay.net/~mpeppler