Re: best paging strategies for large datasets?

From: Justin Graf <justin(at)magwerks(dot)com>
To: pgsql-sql(at)postgresql(dot)org, vindex+lists-pgsql-sql(at)apartia(dot)org
Subject: Re: best paging strategies for large datasets?
Date: 2010-05-13 13:57:56
Message-ID: 4BEC0564.7020403@magwerks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 5/13/2010 3:43 AM, Louis-David Mitterrand wrote:
**snip***
>
>> What do you mean by quite slow??
>>
> Like several seconds. I have to cache the results.
>

Well then i suggest posting the queries to Performance or here and let
us take a look them
don't forget to include the explain/analyze, and number of records in
each table.
>> On a 30K record table count() and query speed should not be a problem..
>>
> This query is a large multi-join of times series data, not a single
> table. And it's not (prematurely :) optimized.
>
> I'm planning a materialized view for it.
>

here read this
http://www.pgcon.org/2008/schedule/events/69.en.html

The question that begs to be asked how big are the tables the query is
accessing??

if its not hundreds of thousands to millions of records or on a stone
age Server , my guess is the query can be improved.

> **snip**
>> RecordCount/Limit = Number of pages
>> CurrentPage = (offset%RecordCount)/Limit
>>
> These simple formulas we bill handy.
>

don't forget to use floor on these in what ever language your
programming in

All legitimate Magwerks Corporation quotations are sent in a .PDF file attachment with a unique ID number generated by our proprietary quotation system. Quotations received via any other form of communication will not be honored.

CONFIDENTIALITY NOTICE: This e-mail, including attachments, may contain legally privileged, confidential or other information proprietary to Magwerks Corporation and is intended solely for the use of the individual to whom it addresses. If the reader of this e-mail is not the intended recipient or authorized agent, the reader is hereby notified that any unauthorized viewing, dissemination, distribution or copying of this e-mail is strictly prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and destroy all occurrences of this e-mail immediately.
Thank you.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Rob Sargent 2010-05-13 15:18:03 Re: Invalid message format Exception
Previous Message Justin Graf 2010-05-13 13:28:03 Re: best paging strategies for large datasets?