Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Query re Sybase::CTlib's ct_sql returning alot of data
Date: Aug 16 2000 4:25PM writes:
 > I suppose this query is going directly to you Michael but I am interested if
 > anyone else has experience in using ct_sql (or Simple's methods) to return
 > large datasets
 > In the document 'Sybperl 2.0: Using the Sybase::CTlib module' 
 > (
 > Michael Peppler states regarding the use of ct_sql in the section One Step
 > Queries:
 > "
 > This one step call is very useful for writing simple, clear code, but has
 > one major drawback: the entire query result set is loaded into memory, which
 > makes it unusable for processing large result sets. 
 > "
 > When you say unusable for large result sets, do you mean there is a problem
 > with either ctlib or Sybase::CTlib when returning large result sets or that
 > this would fail if you ran out of memory during the operation.

Well - if you're doing this:

my $data = $dbh->ct_sql("select * from my_huge_table");

and "my_huge_table" has 100 million rows then your script is going to
crash (unless you run in 64bit mode and have a huge address space...)

There's no internal limitation on ct_sql, or perl, apart from the
available memory.

Michael Peppler         -||-  Data Migrations Inc.    -||-
Int. Sybase User Group  -||-
Sybase on Linux mailing list: