Re: ** HELP: Best way to connect Web srvr to Sybase for fastest response??

From: Van Scott <scottv_at_computek.net>
Date: 1996/05/01
Message-ID: <4m6hqo$5ud_at_canton.charm.net>#1/1


In article <aiDqM0ut.9wF_at_netcom.com>, ai_at_netcom.com ( ) says:
>
>April 29, 1996
>
>Hello,
>
>There is a Sun SPARCstation server here running SunOS 4.1.3 (and Solaris
>2.4 at times).
>
>This SPARC server is also running the Apache Web server (httpd) and Sybase
>SQL Server with a 1 - 5 Gb database (mostly numerical records and some
>text blocks). (The Apache server may be interchanged with a Netscape
>server or Spyglass server in the future depending on performance
>tests down the road).
>
>The SQL database will be accessed by browsers typically just a few
>times a minute across say 25 - 50 users. And a typical query will
>result in the transmission of about 100 - 400 records of about 100 - 200
>bytes per record.
>
>Questions:
>
>9. What is the 'best' interface/gateway to use between the Web server
>(httpd) and the Sybase database in order to result in the fastest
>response of query results of the database being sent back to the
>client browser?
>
>2. Is using PERL vs. C Shell script vs. a C application vs. ?? going to
>result in better overall performance from the end user's perpespective?
>
>(I understand that a script approach will usually mean interfacing
>to Sybase by a command line (isql?) whereas a C app will be able to make
>Sybase dblib calls. So maybe part of my question is - does Sybase
>process command line queries faster than dblib queries?)
>
>3. Are there freeware/shareware gateways out there that will do this?
>I know about GSQL but is it out of date?
>
>
>Thanks very much for any help/pointers on this.
>
> ai_at_netcom.com
>

A CGI call to Sybase has at least four (probably five) parts relating to performance:

	o fork/exec of CGI program (probably)
	o load CGI program from unix file
	o connect to sybase
	o grab data from Sybase 
	o send to web server

A C program will probably execute more quickly than Perl or Shell, but you may check to see if SunOS supports the "sticky bit", (look at chmod) in which case, Perl may execute as quickly as C second time around. You won't be able to avoid the overhead of connetions with CGI programs, although I believe web.sql (a new Sybase product) helps with this. As far as access to the SQL Server data, relevant indexes and a "good size" cache help. You might timestamp each of the sections to see what the relative times are when execuing CGI scripts.

SQL Server doesn't necessarily process "command-line" queries faster than "dblib queries" (isql is a dblib or ctlib program, after all). However, it will generally process stored procedures "faster" than dynamic SQL.

I've not used GSQL.

Van

You switch between SUN OS 4.x and Solaris? Received on Wed May 01 1996 - 00:00:00 CEST

Original text of this message