Unix Technical Forum

Re: Double query (limit and offset)

This is a discussion on Re: Double query (limit and offset) within the pgsql Sql forums, part of the PostgreSQL category; --> Michael Landin Hostbaek wrote: > List, > > I'm using the OFFSET / LIMIT combo in order to split ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Sql

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 11:50 AM
Richard Huxton
 
Posts: n/a
Default Re: Double query (limit and offset)

Michael Landin Hostbaek wrote:
> List,
>
> I'm using the OFFSET / LIMIT combo in order to split up my query, so it
> only parses 20 rows at a time (for my php-scripted webpage).


The best way to do it is to have a layer between your application and
the database that can cache the results of your query. Unfortunately PHP
is not ideal for this - you might want to google for "php memcache" and
"pgmemcache" though.

Once you can cache the query, you run it once, use the row-count and
then fetch the rows from cache.
--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:34 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com