PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: questions re array binding and improved network performance
Date: Aug 17 1999 6:25PM

Jeff Greif writes:
 > I've been looking at both the Sybase::CTlib and Open Client Library docs.
 > It's unclear (to me) from the latter that if array binding is used to
 > retrieve multiple rows at a time, that this actually reduces the number of
 > calls across the network to the server (assuming the packet size is big
 > enough to hold more than one row's worth of data).  Does this happen in
 > ordinary language command execution, or only when cursors are used?

You should be able to use it in ordinary langyage calls. However,
sybperl does not do any array binding for multi-row fetches.

 > 
 > Secondly, is there some way to use the Sybperl ct_sql in such a way that
 > array binding is used internally to improve performance?  What I'd like, I
 > guess, is to be able to give an additional parameter to ct_sql to have it
 > suck the result rows off the server in batches of 20 or 50 as it builds the
 > Perl arrays containing the results.  Is there any way to use ct_execute or
 > ct_command used this way along with ct_fetch?  I didn't see Sybperl
 > documentation of anything like the Open Client Library's ctbind which is
 > what's used for array binding.
 > 
 > If array binding is either not useful in the Sybperl implementation, or
 > hasn't been implemented yet but is on someone's wishlist, is there some
 > alternative way to achieve this optimization.

It hasn't been implemented, and I don't really see what could be done
to arrive at the same results. You can of course write a subroutine
that calls ct_fetch() the appropriate number of times, and returns a
perl array with the fetched rows, but that wouldn't gain you anything
from the network traffic point of view.

 > 
 > Finally, I've hit the same wall as many others in being unable to access MS
 > SQL Server 7 from Sybperl.  Has anyone heard whether Sybase plans to modify
 > the Open Client Library or network layer to work around this
 > incompatibility?

I doubt it. Sybase has a gateway that you can use (I think) to talk to 
MS-SQL. Personally I think that it's MS that screwed up their
backwards compatibility with SQL Server 7...

Michael
-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@peppler.org    -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com