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: John_Erjavec at cargill dot com
Subject: RE: return only a subset of a result
Date: May 22 1998 2:34PM

     Are you going to be showing all the results to the user at some 
     point?  If so, maybe you should think about returning all the rows, 
     and then processing them at the machine the program is running on.  
     You could put the entire result set into an array, and then just 
     display the results that you are interested in, when you are 
     interested in them.  This would only be a god idea if your array 
     wasn't too big for your machine, and if you were planning on showing 
     enough of the resulting rows to the user.  Just a thought.

______________________________ Reply Separator _________________________________
Subject: RE: return only a subset of a result
Author:  albert ( at mtka-unix-mime
Date:    5/21/98 9:31 PM

Well :) If it's post then all I need to do is loop through and skip and 
extract the rows that I want. Not much else you can do I suppose.
So the time consuming part is the SQL itself. I am working with a
> 40Gb database from which an average select statement (with filtering) 
will give me about 100,000 rows in return. So my aim is to not show 
everything in 1 go but show them in pages of, say, 10 or 20, at a
time. Now if there's a way for me to specify which rows of the final
result set that Sybase will return to me then that'll be idea. It'll be the 
most time efficient way to do it. But can it be done? That's the question.
Thanks :)
|   ANGIS- The Australian National Genomic Information Service |
|      email:   |
|    Phone: 61-2-9351 7219          FAX: 61-2-9351 5694              | 
On Friday, May 22, 1998 11:55 AM, Leigh Moncher [] wrote: 
> Okay okay...  And yes it is an interesting problem....  Didn't quite
> catch the idea of the program there...  Is your issue post evaluate 
> (i.e.working the result set) or with the actual turnaround of returning 
> the rows?
> At 09:45 AM 5/22/98 +1000, Albert Ng wrote:
> >Exactly! Thank You Tim :) My SQL can be as refine as possible but
> >that's not the point. The point is for ANY SQL result, I don't wanna
> >so everything to the user in one go, 'cuz that could take forever to do. 
> >So I was trying to PAGE the results into pages of 10 or 20 or "N".
> >Now if I process everything it'll miss the point of paging it. So ........ 
> >what do you think?