RE: Paging large recordsets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



One way that I have found - but never used is...

http://sqlrelay.sourceforge.net/

It can cache result sets in a file for later use.  You can then use It
does a whole bunch of other stuff too.  I really need to install this
and start working with it.

- Paul

-----Original Message-----
From: Robert Twitty [mailto:rtwitty@xxxxxxxxxxxxxxxxx] 
Sent: Friday, February 13, 2004 1:59 PM
To: Paul Miller
Cc: php-db@xxxxxxxxxxxxx
Subject: RE:  Paging large recordsets


If you are not opearating in a stateless environment, then you could use
a cursor.  The web is a stateless environment, and therefore the record
set needs to be cached either to disk or memeory.  The other alternative
is to rerun the query for each page request.  Using disk space to store
query results for the purpose of paging over the web is commonly done by
search engines, and even some database engines use disk space for cursor
implementation.  I agree that using session variables for this purpose
is not ideal, but what's the alternative in PHP?  Storing only the
identifiers instead of all the data significantly lessons the impact.

I agree, it should be avoided if possible.

-- bob

On Fri, 13 Feb 2004, Paul Miller wrote:

> In no way I am trying start some long thread here.  But I have always 
> heard it was bad to store that much data in a session array?  I could 
> just be really off here and not understanding what I have read.  I 
> know PHP stores the sessions as text files.  The only reason I can 
> come up with why one should not store large amounts of data would be 
> disk write/read speed per user.
>
> Can someone clarify this for me?
>
> - Paul
>
> -----Original Message-----
> From: Robert Twitty [mailto:rtwitty@xxxxxxxxxxxxxxxxx]
> Sent: Friday, February 13, 2004 12:34 PM
> To: Karen Resplendo
> Cc: php-db@xxxxxxxxxxxxx
> Subject: Re:  Paging large recordsets
>
>
> Most of the PHP solutions I have seeen require the use of session 
> variables.  You could create an array containing only the unique 
> identifiers of all the records, and then store it into a session 
> variable. You would then use another session variable to retain the 
> page size, and then include the page numbers in the "Next", "Prev", 
> "First", "Last" and "Absolutr" page links.  Printing is probably best 
> done with dynamically generated PDF instead of HTML.
>
> -- bob
>
> On Fri, 13 Feb 2004, Karen Resplendo wrote:
>
> > I guess the time has come that my boss wants "Next", "Previous", 
> > "First", "Last" paging for our data displays of large recordsets or 
> > datasets.
> >
> > Any good solutons out there already? I have pieces of a few 
> > examples.
> >
> > Also, how to deal with printing? I would assume that the ideal page 
> > size is not the ideal printed page size. oi vay!
> >
> > TIA
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Finance: Get your refund fast by filing online
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux